• B
    SMB3: drop reference to cfile before sending oplock break · 59a556ae
    Bharath SM 提交于
    In cifs_oplock_break function we drop reference to a cfile at
    the end of function, due to which close command goes on wire
    after lease break acknowledgment even if file is already closed
    by application but we had deferred the handle close.
    If other client with limited file shareaccess waiting on lease
    break ack proceeds operation on that file as soon as first client
    sends ack, then we may encounter status sharing violation error
    because of open handle.
    Solution is to put reference to cfile(send close on wire if last ref)
    and then send oplock acknowledgment to server.
    
    Fixes: 9e31678f ("SMB3: fix lease break timeout when multiple deferred close handles for the same file.")
    Cc: stable@kernel.org
    Signed-off-by: NBharath SM <bharathsm@microsoft.com>
    Reviewed-by: NShyam Prasad N <sprasad@microsoft.com>
    Signed-off-by: NSteve French <stfrench@microsoft.com>
    59a556ae
file.c 130.8 KB