Ignore:
Timestamp:
May 20, 2009, 6:46:53 PM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Update 3.2 branch to 3.2.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.2.x/source/smbd/aio.c

    r133 r204  
    2525/* The signal we'll use to signify aio done. */
    2626#ifndef RT_SIGNAL_AIO
    27 #define RT_SIGNAL_AIO (SIGRTMIN+3)
     27#ifndef SIGRTMIN
     28#define SIGRTMIN        NSIG
     29#endif
     30#define RT_SIGNAL_AIO   (SIGRTMIN+3)
     31#endif
     32
     33#ifndef HAVE_STRUCT_SIGEVENT_SIGEV_VALUE_SIVAL_PTR
     34#ifdef HAVE_STRUCT_SIGEVENT_SIGEV_VALUE_SIGVAL_PTR
     35#define sival_int       sigval_int
     36#define sival_ptr       sigval_ptr
     37#endif
    2838#endif
    2939
     
    269279        a->aio_sigevent.sigev_value.sival_int = aio_ex->mid;
    270280
     281        become_root();
    271282        if (SMB_VFS_AIO_READ(fsp,a) == -1) {
    272283                DEBUG(0,("schedule_aio_read_and_X: aio_read failed. "
    273284                         "Error %s\n", strerror(errno) ));
    274285                delete_aio_ex(aio_ex);
    275                 return False;
    276         }
     286                unbecome_root();
     287                return False;
     288        }
     289        unbecome_root();
    277290
    278291        DEBUG(10,("schedule_aio_read_and_X: scheduled aio_read for file %s, "
     
    367380        a->aio_sigevent.sigev_value.sival_int = aio_ex->mid;
    368381
     382        become_root();
    369383        if (SMB_VFS_AIO_WRITE(fsp,a) == -1) {
    370384                DEBUG(3,("schedule_aio_wrote_and_X: aio_write failed. "
    371385                         "Error %s\n", strerror(errno) ));
    372386                delete_aio_ex(aio_ex);
    373                 return False;
    374         }
    375 
     387                unbecome_root();
     388                return False;
     389        }
     390        unbecome_root();
     391       
    376392        release_level_2_oplocks_on_change(fsp);
    377393
     
    576592        int err;
    577593
     594        if(!aio_ex) {
     595                DEBUG(3, ("handle_aio_completed: Non-existing aio_ex passed\n"));
     596                return false;
     597        }
     598
    578599        /* Ensure the operation has really completed. */
    579600        if (SMB_VFS_AIO_ERROR(aio_ex->fsp, &aio_ex->acb) == EINPROGRESS) {
Note: See TracChangeset for help on using the changeset viewer.