FAILED: patch "[PATCH] ksmbd: skip metadata-only stream opens in the delete check" failed to apply to 7.3-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 7.3-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-7.3.y
git checkout FETCH_HEAD
git cherry-pick -x 2f14fe2d589583ce649b2bf1b449cc9839abda8b
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026112507-uncivil-cesarean-e13f@gregkh' --subject-prefix 'PATCH 7.3.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 2f14fe2d589583ce649b2bf1b449cc9839abda8b Mon Sep 17 00:00:00 2001
From: Ian Bridges <[email protected]>
Date: Thu, 5 Nov 2026 21:53:45 -0600
Subject: [PATCH] ksmbd: skip metadata-only stream opens in the delete check
A metadata-only named-stream open without FILE_SHARE_DELETE blocks a later DELETE open of the file. It also blocks setting the file delete pending.
Ignore a stream open unless its effective access includes data, execute or delete access. Reuse the sharing-access helper so overwriting a stream, or creating one on an existing file, still counts as FILE_WRITE_DATA. The Time Machine AFP_AfpInfo synthesis keeps only its requested access.
fs/smb/server/vfs_cache.c +6 -1
@@ -420,7 +420,12 @@ bool ksmbd_has_stream_without_delete_share(struct ksmbd_file *fp)if (file_inode (fp->filp) !=file_inode (prev_fp->filp))continue ; -if (!(prev_fp->saccess &FILE_SHARE_DELETE_LE )) { +/* +* A stream open with no right in FILE_SHARE_CHECKED_ACCESS_LE, +* implied writes included, never conflicts. +*/ +if (!(prev_fp->saccess &FILE_SHARE_DELETE_LE ) && +ksmbd_sharing_daccess (prev_fp) &FILE_SHARE_CHECKED_ACCESS_LE ) { ret = true;break ; }
Sasha Levin
maintainerPATCH 1/1 ksmbd: skip metadata-only stream opens in the delete check
From: Ian Bridges <[email protected]>
[ Upstream commit 2f14fe2d589583ce649b2bf1b449cc9839abda8b ]
A metadata-only named-stream open without FILE_SHARE_DELETE blocks a later DELETE open of the file. It also blocks setting the file delete pending.
Ignore a stream open unless its effective access includes data, execute or delete access. Reuse the sharing-access helper so overwriting a stream, or creating one on an existing file, still counts as FILE_WRITE_DATA. The Time Machine AFP_AfpInfo synthesis keeps only its requested access.
---
Depends on <[email protected]>
fs/smb/server/vfs_cache.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
fs/smb/server/vfs_cache.c +6 -1
@@ -344,7 +344,12 @@ bool ksmbd_has_stream_without_delete_share(struct ksmbd_file *fp)if (file_inode (fp->filp) !=file_inode (prev_fp->filp))continue ; -if (!(prev_fp->saccess &FILE_SHARE_DELETE_LE )) { +/* +* A stream open with no right in FILE_SHARE_CHECKED_ACCESS_LE, +* implied writes included, never conflicts. +*/ +if (!(prev_fp->saccess &FILE_SHARE_DELETE_LE ) && +ksmbd_sharing_daccess (prev_fp) &FILE_SHARE_CHECKED_ACCESS_LE ) { ret = true;break ; }
Signature · 1 line
2.53.0