Skip to content

Commit 9ed9d83

Browse files
author
Steve French
committed
smb3: request handle caching when caching directories
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: [email protected] Signed-off-by: Steve French <[email protected]>
1 parent 0d6b0d2 commit 9ed9d83

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/smb/client/smb2ops.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4080,7 +4080,7 @@ map_oplock_to_lease(u8 oplock)
40804080
if (oplock == SMB2_OPLOCK_LEVEL_EXCLUSIVE)
40814081
return SMB2_LEASE_WRITE_CACHING_LE | SMB2_LEASE_READ_CACHING_LE;
40824082
else if (oplock == SMB2_OPLOCK_LEVEL_II)
4083-
return SMB2_LEASE_READ_CACHING_LE;
4083+
return SMB2_LEASE_READ_CACHING_LE | SMB2_LEASE_HANDLE_CACHING_LE;
40844084
else if (oplock == SMB2_OPLOCK_LEVEL_BATCH)
40854085
return SMB2_LEASE_HANDLE_CACHING_LE | SMB2_LEASE_READ_CACHING_LE |
40864086
SMB2_LEASE_WRITE_CACHING_LE;

0 commit comments

Comments
 (0)