Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: ChenXiaoSong <chenxiaosong@chenxiaosong.com>
To: Steve French <smfrench@gmail.com>
Cc: linkinjeon@kernel.org, pc@manguebit.org,
	ronniesahlberg@gmail.com, sprasad@microsoft.com, tom@talpey.com,
	bharathsm@microsoft.com, senozhatsky@chromium.org,
	dhowells@redhat.com, metze@samba.org, slow@samba.org,
	linux-cifs@vger.kernel.org,
	ChenXiaoSong <chenxiaosong@kylinos.cn>
Subject: Re: [PATCH v2 3/3] smb/client: fix nlink of an overwritten open file
Date: Wed, 5 Aug 2026 03:38:55 +0800	[thread overview]
Message-ID: <56857873-dfb4-49c3-8627-e7674bde8ac6@chenxiaosong.com> (raw)
In-Reply-To: <36cdfc79-e586-48d1-a821-a1c86760cf19@chenxiaosong.com>

As Ralph said,

- if there are one or more non-POSIX opens on the destination, MUST fail 
with STATUS_ACCESS_DENIED
- if there are only POSIX opens, the operation can proceed

Samba should allow the rename to succeed so that the silly-rename is not 
triggered.

We should fix this bug in Samba so that the Linux client should call 
cifs_drop_nlink(). Since silly-rename will not be triggered, 
__cifs_unlink() will not be called either.

在 2026/8/5 2:53, ChenXiaoSong 写道:
> Samba has a bug, please check the email: https://lore.kernel.org/linux- 
> cifs/0f6a5c9c-2c65-480e-aa44-facdf11fecc0@samba.org/
> 
> 在 2026/8/5 1:08, Steve French 写道:
>> generic/035 passes to Samba with posix mount option without the patch.
>> Any idea why this patch was needed for ksmbd but not for Samba
> 

-- 
ChenXiaoSong <chenxiaosong@chenxiaosong.com>
Chinese Homepage: https://chenxiaosong.com
English Homepage: https://chenxiaosong.com/en


      reply	other threads:[~2026-08-04 19:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-04 12:32 [PATCH v2 0/3] smb: fix xfstests generic/035 ChenXiaoSong
2026-08-04 12:32 ` [PATCH v2 1/3] smb/server: rename to ksmbd_has_nonposix_open_child() ChenXiaoSong
2026-08-04 12:33 ` [PATCH v2 2/3] smb/server: deny overwriting targets with non-POSIX opens ChenXiaoSong
2026-08-05  2:17   ` Namjae Jeon
2026-08-05  2:25     ` ChenXiaoSong
     [not found]     ` <2df0ad6e-fa5c-425d-9ec1-5c668f84a4bd@chenxiaosong.com>
2026-08-05  5:46       ` Namjae Jeon
2026-08-05  5:53         ` ChenXiaoSong
2026-08-04 12:33 ` [PATCH v2 3/3] smb/client: fix nlink of an overwritten open file ChenXiaoSong
2026-08-04 17:08   ` Steve French
2026-08-04 18:53     ` ChenXiaoSong
2026-08-04 19:38       ` ChenXiaoSong [this message]

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=56857873-dfb4-49c3-8627-e7674bde8ac6@chenxiaosong.com \
    --to=chenxiaosong@chenxiaosong.com \
    --cc=bharathsm@microsoft.com \
    --cc=chenxiaosong@kylinos.cn \
    --cc=dhowells@redhat.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=metze@samba.org \
    --cc=pc@manguebit.org \
    --cc=ronniesahlberg@gmail.com \
    --cc=senozhatsky@chromium.org \
    --cc=slow@samba.org \
    --cc=smfrench@gmail.com \
    --cc=sprasad@microsoft.com \
    --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