Skip to content
Commit 588fe29c authored by Pavel Shilovsky's avatar Pavel Shilovsky Committed by Ben Hutchings
Browse files

CIFS: Do not reset lease state to NONE on lease break

commit 7b9b9edb 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: default avatarPavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
[bwh: Backported to 3.16: drop change in smb311_operations]
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 98afbb37
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment