Skip to content

Commit 83cb4fb

Browse files
smfrenchgregkh
authored andcommitted
smb3: request handle caching when caching directories
commit 9ed9d83 upstream. This client was only requesting READ caching, not READ and HANDLE caching in the LeaseState on the open requests we send for directories. To delay closing a handle (e.g. for caching directory contents) we should be requesting HANDLE as well as READ (as we already do for deferred close of files). See MS-SMB2 3.3.1.4 e.g. Cc: stable@vger.kernel.org Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent edf5b29 commit 83cb4fb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/smb/client/smb2ops.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4016,7 +4016,7 @@ map_oplock_to_lease(u8 oplock)
40164016
if (oplock == SMB2_OPLOCK_LEVEL_EXCLUSIVE)
40174017
return SMB2_LEASE_WRITE_CACHING_LE | SMB2_LEASE_READ_CACHING_LE;
40184018
else if (oplock == SMB2_OPLOCK_LEVEL_II)
4019-
return SMB2_LEASE_READ_CACHING_LE;
4019+
return SMB2_LEASE_READ_CACHING_LE | SMB2_LEASE_HANDLE_CACHING_LE;
40204020
else if (oplock == SMB2_OPLOCK_LEVEL_BATCH)
40214021
return SMB2_LEASE_HANDLE_CACHING_LE | SMB2_LEASE_READ_CACHING_LE |
40224022
SMB2_LEASE_WRITE_CACHING_LE;

0 commit comments

Comments
 (0)