mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ian Bridges <icb@fastmail.org>
To: linkinjeon@kernel.org
Cc: senozhatsky@chromium.org, tom@talpey.com,
	chenxiaosong@chenxiaosong.com, linux-cifs@vger.kernel.org,
	linux-kernel@vger.kernel.org, Ian Bridges <icb@fastmail.org>
Subject: [PATCH 0/2] ksmbd: exclude metadata-only opens from sharing checks
Date: Wed,  4 Nov 2026 12:37:00 -0600	[thread overview]
Message-ID: <20261104183702.192452-1-icb@fastmail.org> (raw)

A metadata-only open holds none of FILE_EXECUTE, FILE_READ_DATA,
FILE_WRITE_DATA, FILE_APPEND_DATA and DELETE. An open for READ_CONTROL
is one example. ksmbd still counts such opens in sharing checks. Held
without sharing, one blocks later reads, writes and deletes of the file.
Held on a stream without FILE_SHARE_DELETE, one blocks deleting the
file.

Patch 1 fixes the general sharing check. Patch 2 fixes the stream
delete check added in v7.2. They are split so that patch 1 can be
backported without the v7.2 stream helper.

This series was developed with LLM assistance.

Ian Bridges (2):
  ksmbd: skip metadata-only opens in sharing checks
  ksmbd: skip metadata-only stream opens in the delete check

 fs/smb/server/smb_common.c | 9 +++++++++
 fs/smb/server/smb_common.h | 4 ++++
 fs/smb/server/vfs_cache.c  | 7 ++++++-
 3 files changed, 19 insertions(+), 1 deletion(-)


base-commit: e49296d51ccbf2ad0ed0484db1382f1d7217bd6e
-- 
2.47.3


             reply	other threads:[~2026-11-04 18:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04 18:37 Ian Bridges [this message]
2026-11-04 18:37 ` [PATCH 1/2] ksmbd: skip metadata-only opens in " Ian Bridges
2026-11-05 11:58   ` Namjae Jeon
2026-11-04 18:37 ` [PATCH 2/2] ksmbd: skip metadata-only stream opens in the delete check Ian Bridges

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261104183702.192452-1-icb@fastmail.org \
    --to=icb@fastmail.org \
    --cc=chenxiaosong@chenxiaosong.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=senozhatsky@chromium.org \
    --cc=tom@talpey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®