• P
    CIFS: Do not reset lease state to NONE on lease break · 3ed9f22e
    Pavel Shilovsky 提交于
    commit 7b9b9edb49ad377b1e06abf14354c227e9ac4b06 upstream.
    
    Currently on lease break the client sets a caching level twice:
    when oplock is detected and when oplock is processed. While the
    1st attempt sets the level to the value provided by the server,
    the 2nd one resets the level to None unconditionally.
    This happens because the oplock/lease processing code was changed
    to avoid races between page cache flushes and oplock breaks.
    The commit c11f1df5 ("cifs: Wait for writebacks to complete
    before attempting write.") fixed the races for oplocks but didn't
    apply the same changes for leases resulting in overwriting the
    server granted value to None. Fix this by properly processing
    lease breaks.
    Signed-off-by: NPavel Shilovsky <pshilov@microsoft.com>
    Signed-off-by: NSteve French <stfrench@microsoft.com>
    CC: Stable <stable@vger.kernel.org>
    Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    3ed9f22e
smb2misc.c 24.1 KB