From: Greg Kroah-Hartman Date: Tue, 3 Dec 2024 10:50:52 +0000 (+0100) Subject: 6.1-stable patches X-Git-Tag: v4.19.325~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f901ec8d2aa17d92f09c49641dec51ca6197fb1;p=thirdparty%2Fkernel%2Fstable-queue.git 6.1-stable patches added patches: smb3-request-handle-caching-when-caching-directories.patch --- diff --git a/queue-6.1/series b/queue-6.1/series index 17f885baffa..cd740ae7935 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -424,3 +424,4 @@ alsa-hda-realtek-update-alc225-depop-procedure.patch alsa-hda-realtek-set-pcbeep-to-default-value-for-alc274.patch alsa-hda-realtek-fix-internal-speaker-and-mic-boost-of-infinix-y4-max.patch alsa-hda-realtek-apply-quirk-for-medion-e15433.patch +smb3-request-handle-caching-when-caching-directories.patch diff --git a/queue-6.1/smb3-request-handle-caching-when-caching-directories.patch b/queue-6.1/smb3-request-handle-caching-when-caching-directories.patch new file mode 100644 index 00000000000..cf194ad971d --- /dev/null +++ b/queue-6.1/smb3-request-handle-caching-when-caching-directories.patch @@ -0,0 +1,33 @@ +From 9ed9d83a51a9636d367c796252409e7b2f4de4d4 Mon Sep 17 00:00:00 2001 +From: Steve French +Date: Mon, 18 Nov 2024 12:19:46 -0600 +Subject: smb3: request handle caching when caching directories + +From: Steve French + +commit 9ed9d83a51a9636d367c796252409e7b2f4de4d4 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 +Signed-off-by: Greg Kroah-Hartman +--- + fs/smb/client/smb2ops.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/fs/smb/client/smb2ops.c ++++ b/fs/smb/client/smb2ops.c +@@ -4260,7 +4260,7 @@ map_oplock_to_lease(u8 oplock) + if (oplock == SMB2_OPLOCK_LEVEL_EXCLUSIVE) + return SMB2_LEASE_WRITE_CACHING_LE | SMB2_LEASE_READ_CACHING_LE; + else if (oplock == SMB2_OPLOCK_LEVEL_II) +- return SMB2_LEASE_READ_CACHING_LE; ++ return SMB2_LEASE_READ_CACHING_LE | SMB2_LEASE_HANDLE_CACHING_LE; + else if (oplock == SMB2_OPLOCK_LEVEL_BATCH) + return SMB2_LEASE_HANDLE_CACHING_LE | SMB2_LEASE_READ_CACHING_LE | + SMB2_LEASE_WRITE_CACHING_LE;