Ignore:
Timestamp:
Nov 12, 2012, 7:10:02 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server 3.5: update branche to 3.5.18

Location:
branches/samba-3.5.x/source3/smbd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.5.x/source3/smbd/blocking.c

    r429 r738  
    300300*****************************************************************************/
    301301
    302 static void reply_lockingX_error(struct blocking_lock_record *blr, NTSTATUS status)
     302static void undo_locks_obtained(struct blocking_lock_record *blr)
    303303{
    304304        files_struct *fsp = blr->fsp;
     
    344344                        WINDOWS_LOCK);
    345345        }
    346 
    347         generic_blocking_lock_error(blr, status);
    348346}
    349347
     
    358356        switch(blr->req->cmd) {
    359357        case SMBlockingX:
    360                 reply_lockingX_error(blr, status);
    361                 break;
     358                /*
     359                 * This code can be called during the rundown of a
     360                 * file after it was already closed. In that case,
     361                 * blr->fsp==NULL and we do not need to undo any
     362                 * locks, they are already gone.
     363                 */
     364                if (blr->fsp != NULL) {
     365                        undo_locks_obtained(blr);
     366                }
     367                generic_blocking_lock_error(blr, status);
     368                break;
    362369        case SMBtrans2:
    363370        case SMBtranss2:
  • branches/samba-3.5.x/source3/smbd/open.c

    r736 r738  
    895895}
    896896
    897 static bool is_delete_request(files_struct *fsp) {
    898         return ((fsp->access_mask == DELETE_ACCESS) &&
    899                 (fsp->oplock_type == NO_OPLOCK));
    900 }
    901 
    902897/*
    903898 * Send a break message to the oplock holder and delay the open for
     
    1003998
    1004999        if (exclusive != NULL) { /* Found an exclusive oplock */
    1005                 bool delay_it = is_delete_request(fsp) ?
    1006                                 BATCH_OPLOCK_TYPE(exclusive->op_type) : true;
    10071000                SMB_ASSERT(!have_level2);
    1008                 if (delay_it) {
    1009                         send_break_message(fsp, exclusive, mid, oplock_request);
    1010                         return true;
    1011                 }
     1001                send_break_message(fsp, exclusive, mid, oplock_request);
     1002                return true;
    10121003        }
    10131004
Note: See TracChangeset for help on using the changeset viewer.