Skip to content

Commit 2ba37b5

Browse files
committed
smb3: request handle caching when caching directories
jira LE-2522 Rebuild_History Non-Buildable kernel-5.14.0-503.29.1.el9_5 commit-author Steve French <[email protected]> commit 9ed9d83 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]> (cherry picked from commit 9ed9d83) Signed-off-by: Jonathan Maple <[email protected]>
1 parent 6f1ab16 commit 2ba37b5

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
@@ -3972,7 +3972,7 @@ map_oplock_to_lease(u8 oplock)
39723972
if (oplock == SMB2_OPLOCK_LEVEL_EXCLUSIVE)
39733973
return SMB2_LEASE_WRITE_CACHING_LE | SMB2_LEASE_READ_CACHING_LE;
39743974
else if (oplock == SMB2_OPLOCK_LEVEL_II)
3975-
return SMB2_LEASE_READ_CACHING_LE;
3975+
return SMB2_LEASE_READ_CACHING_LE | SMB2_LEASE_HANDLE_CACHING_LE;
39763976
else if (oplock == SMB2_OPLOCK_LEVEL_BATCH)
39773977
return SMB2_LEASE_HANDLE_CACHING_LE | SMB2_LEASE_READ_CACHING_LE |
39783978
SMB2_LEASE_WRITE_CACHING_LE;

0 commit comments

Comments
 (0)