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

File:
1 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:
Note: See TracChangeset for help on using the changeset viewer.