Re: [PATCH v2 0/2] ksmbd: exclude metadata-only opens from sharing checks

From: Namjae Jeon

Date: Fri Nov 06 2026 - 05:46:40 EST


On Fri, Nov 6, 2026 at 12:53 PM Ian Bridges <icb@xxxxxxxxxxxx> wrote:
>
> ksmbd includes opens that hold no data, execute or delete access in
> sharing checks. Such a metadata-only open without sharing can block
> later reads, writes and deletes. A metadata-only stream open can also
> block deleting the file.
>
> Patch 1 fixes the general sharing check. Patch 2 fixes the stream delete
> check added in v7.2. They are separate so patch 1 can be backported
> without the stream helper. Patch 2 uses the helper patch 1 adds.
>
> This series was developed with LLM assistance.
>
> ---
> Changes in v2:
> - Use disposition-implied access in both sharing checks. This covers
> Namjae's READ_CONTROL plus FILE_OVERWRITE case and named streams.
> - Keep the requested access on the returned handle.
> - Leave the attribute-only pairing rule and Time Machine AFP_AfpInfo
> synthesis unchanged.
> - Treat FILE_SUPERSEDE as writing because ksmbd implements it by
> truncating, although MS-FSA grants DELETE.
>
> This differs from my reply to v1, which proposed changing only the
> truncate path and leaving patch 2 unchanged.
>
> v1: https://lore.kernel.org/linux-cifs/20261104183702.192452-1-icb@xxxxxxxxxxxx/
>
> Ian Bridges (2):
> ksmbd: skip metadata-only opens in sharing checks
> ksmbd: skip metadata-only stream opens in the delete check
Can you check Sashiko's review comments ?

https://sashiko.dev/#/patchset/20261106035345.728454-1-icb%40fastmail.org

Thanks.