From: Dominique Martinet <asmadeus@codewreck.org>
To: Jeff Layton <jlayton@kernel.org>
Cc: Eric Van Hensbergen <ericvh@kernel.org>,
Latchesar Ionkov <lucho@ionkov.net>,
Christian Schoenebeck <linux_oss@crudebyte.com>,
David Sterba <dsterba@suse.com>,
David Howells <dhowells@redhat.com>,
Marc Dionne <marc.dionne@auristor.com>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
"Tigran A. Aivazian" <aivazian.tigran@gmail.com>,
Chris Mason <clm@fb.com>, Xiubo Li <xiubli@redhat.com>,
Ilya Dryomov <idryomov@gmail.com>,
Jan Harkes <jaharkes@cs.cmu.edu>,
coda@cs.cmu.edu, Tyler Hicks <code@tyhicks.com>,
Jeremy Kerr <jk@ozlabs.org>, Ard Biesheuvel <ardb@kernel.org>,
Namjae Jeon <linkinjeon@kernel.org>,
Sungjong Seo <sj1557.seo@samsung.com>,
Yuezhang Mo <yuezhang.mo@sony.com>, Theodore Ts'o <tytso@mit.edu>,
Andreas Dilger <adilger.kernel@dilger.ca>,
Jaegeuk Kim <jaegeuk@kernel.org>, Chao Yu <chao@kernel.org>,
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>,
Miklos Szeredi <miklos@szeredi.hu>,
Andreas Gruenbacher <agruenba@redhat.com>,
Viacheslav Dubeyko <slava@dubeyko.com>,
John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
Yangtao Li <frank.li@vivo.com>,
Richard Weinberger <richard@nod.at>,
Anton Ivanov <anton.ivanov@cambridgegreys.com>,
Johannes Berg <johannes@sipsolutions.net>,
Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>,
Muchun Song <muchun.song@linux.dev>,
Oscar Salvador <osalvador@suse.de>,
David Hildenbrand <david@redhat.com>,
David Woodhouse <dwmw2@infradead.org>,
Dave Kleikamp <shaggy@kernel.org>,
Trond Myklebust <trondmy@kernel.org>,
Anna Schumaker <anna@kernel.org>,
Ryusuke Konishi <konishi.ryusuke@gmail.com>,
Konstantin Komarov <almaz.alexandrovich@paragon-software.com>,
Mark Fasheh <mark@fasheh.com>, Joel Becker <jlbec@evilplan.org>,
Joseph Qi <joseph.qi@linux.alibaba.com>,
Bob Copeland <me@bobcopeland.com>,
Mike Marshall <hubcap@omnibond.com>,
Martin Brandenburg <martin@omnibond.com>,
Amir Goldstein <amir73il@gmail.com>,
Steve French <sfrench@samba.org>,
Paulo Alcantara <pc@manguebit.org>,
Ronnie Sahlberg <ronniesahlberg@gmail.com>,
Shyam Prasad N <sprasad@microsoft.com>,
Tom Talpey <tom@talpey.com>, Bharath SM <bharathsm@microsoft.com>,
Zhihao Cheng <chengzhihao1@huawei.com>,
Hans de Goede <hansg@kernel.org>,
Carlos Maiolino <cem@kernel.org>, Hugh Dickins <hughd@google.com>,
Baolin Wang <baolin.wang@linux.alibaba.com>,
Andrew Morton <akpm@linux-foundation.org>,
Kees Cook <kees@kernel.org>,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
Jonathan Corbet <corbet@lwn.net>,
"Matthew Wilcox (Oracle)" <willy@infradead.org>,
NeilBrown <neilb@ownmail.net>,
linux-kernel@vger.kernel.org, v9fs@lists.linux.dev,
linux-fsdevel@vger.kernel.org, linux-afs@lists.infradead.org,
linux-btrfs@vger.kernel.org, ceph-devel@vger.kernel.org,
codalist@coda.cs.cmu.edu, ecryptfs@vger.kernel.org,
linux-efi@vger.kernel.org, linux-ext4@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net, gfs2@lists.linux.dev,
linux-um@lists.infradead.org, linux-mm@kvack.org,
linux-mtd@lists.infradead.org,
jfs-discussion@lists.sourceforge.net, linux-nfs@vger.kernel.org,
linux-nilfs@vger.kernel.org, ntfs3@lists.linux.dev,
ocfs2-devel@lists.linux.dev,
linux-karma-devel@lists.sourceforge.net,
devel@lists.orangefs.org, linux-unionfs@vger.kernel.org,
linux-cifs@vger.kernel.org, samba-technical@lists.samba.org,
linux-xfs@vger.kernel.org, linux-hardening@vger.kernel.org,
linux-doc@vger.kernel.org
Subject: Re: [PATCH v2] vfs: remove the excl argument from the ->create() inode_operation
Date: Sat, 8 Nov 2025 15:12:10 +0900 [thread overview]
Message-ID: <aQ7fOmknHIxcxuha@codewreck.org> (raw)
In-Reply-To: <20251107-create-excl-v2-1-f678165d7f3f@kernel.org>
Jeff Layton wrote on Fri, Nov 07, 2025 at 10:05:03AM -0500:
> With two exceptions, ->create() methods provided by filesystems ignore
> the "excl" flag. Those exception are NFS and GFS2 which both also
> provide ->atomic_open.
>
> Since ce8644fcadc5 ("lookup_open(): expand the call of vfs_create()"),
> the "excl" argument to the ->create() inode_operation is always set to
> true in vfs_create(). The ->create() call in lookup_open() sets it
> according to the O_EXCL open flag, but is never called if the filesystem
> provides ->atomic_open().
>
> The excl flag is therefore always either ignored or true. Remove it,
> and change NFS and GFS2 to act as if it were always true.
>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
Good cleanup, just one whitespace nitpick below but:
Reviewed-by: Dominique Martinet <asmadeus@codewreck.org>
> diff --git a/Documentation/filesystems/vfs.rst b/Documentation/filesystems/vfs.rst
> index 4f13b01e42eb5e2ad9d60cbbce7e47d09ad831e6..7a55e491e0c87a0d18909bd181754d6d68318059 100644
> --- a/Documentation/filesystems/vfs.rst
> +++ b/Documentation/filesystems/vfs.rst
> @@ -505,7 +505,10 @@ otherwise noted.
> if you want to support regular files. The dentry you get should
> not have an inode (i.e. it should be a negative dentry). Here
> you will probably call d_instantiate() with the dentry and the
> - newly created inode
> + newly created inode. This operation should always provide O_EXCL
This and the block below change halfway from tab (old text) to spaces
(your patch)
Looks like the file has a few space-indented sections though so it won't
be the first if that goes in as is, the html-rendering doesn't seem to
care :)
Cheers,
--
Dominique Martinet | Asmadeus
next prev parent reply other threads:[~2025-11-08 6:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-07 15:05 [PATCH v2] vfs: remove the excl argument from the ->create() inode_operation Jeff Layton
2025-11-07 22:29 ` NeilBrown
2025-11-07 22:35 ` LLM disclosure (was: [PATCH v2] vfs: remove the excl argument from the ->create() inode_operation) Jonathan Corbet
2025-11-07 23:19 ` Jeff Layton
2025-11-07 23:37 ` NeilBrown
2025-11-08 6:12 ` Dominique Martinet [this message]
2025-11-08 9:19 ` [PATCH v2] vfs: remove the excl argument from the ->create() inode_operation Bagas Sanjaya
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=aQ7fOmknHIxcxuha@codewreck.org \
--to=asmadeus@codewreck.org \
--cc=adilger.kernel@dilger.ca \
--cc=agruenba@redhat.com \
--cc=aivazian.tigran@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=almaz.alexandrovich@paragon-software.com \
--cc=amir73il@gmail.com \
--cc=anna@kernel.org \
--cc=anton.ivanov@cambridgegreys.com \
--cc=ardb@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=bharathsm@microsoft.com \
--cc=brauner@kernel.org \
--cc=cem@kernel.org \
--cc=ceph-devel@vger.kernel.org \
--cc=chao@kernel.org \
--cc=chengzhihao1@huawei.com \
--cc=clm@fb.com \
--cc=coda@cs.cmu.edu \
--cc=codalist@coda.cs.cmu.edu \
--cc=code@tyhicks.com \
--cc=corbet@lwn.net \
--cc=david@redhat.com \
--cc=devel@lists.orangefs.org \
--cc=dhowells@redhat.com \
--cc=dsterba@suse.com \
--cc=dwmw2@infradead.org \
--cc=ecryptfs@vger.kernel.org \
--cc=ericvh@kernel.org \
--cc=frank.li@vivo.com \
--cc=gfs2@lists.linux.dev \
--cc=glaubitz@physik.fu-berlin.de \
--cc=gustavoars@kernel.org \
--cc=hansg@kernel.org \
--cc=hirofumi@mail.parknet.co.jp \
--cc=hubcap@omnibond.com \
--cc=hughd@google.com \
--cc=idryomov@gmail.com \
--cc=jack@suse.cz \
--cc=jaegeuk@kernel.org \
--cc=jaharkes@cs.cmu.edu \
--cc=jfs-discussion@lists.sourceforge.net \
--cc=jk@ozlabs.org \
--cc=jlayton@kernel.org \
--cc=jlbec@evilplan.org \
--cc=johannes@sipsolutions.net \
--cc=joseph.qi@linux.alibaba.com \
--cc=kees@kernel.org \
--cc=konishi.ryusuke@gmail.com \
--cc=linkinjeon@kernel.org \
--cc=linux-afs@lists.infradead.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-karma-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-nfs@vger.kernel.org \
--cc=linux-nilfs@vger.kernel.org \
--cc=linux-um@lists.infradead.org \
--cc=linux-unionfs@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=linux_oss@crudebyte.com \
--cc=lucho@ionkov.net \
--cc=marc.dionne@auristor.com \
--cc=mark@fasheh.com \
--cc=martin@omnibond.com \
--cc=me@bobcopeland.com \
--cc=miklos@szeredi.hu \
--cc=mikulas@artax.karlin.mff.cuni.cz \
--cc=muchun.song@linux.dev \
--cc=neilb@ownmail.net \
--cc=ntfs3@lists.linux.dev \
--cc=ocfs2-devel@lists.linux.dev \
--cc=osalvador@suse.de \
--cc=pc@manguebit.org \
--cc=richard@nod.at \
--cc=ronniesahlberg@gmail.com \
--cc=samba-technical@lists.samba.org \
--cc=sfrench@samba.org \
--cc=shaggy@kernel.org \
--cc=sj1557.seo@samsung.com \
--cc=slava@dubeyko.com \
--cc=sprasad@microsoft.com \
--cc=tom@talpey.com \
--cc=trondmy@kernel.org \
--cc=tytso@mit.edu \
--cc=v9fs@lists.linux.dev \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@infradead.org \
--cc=xiubli@redhat.com \
--cc=yuezhang.mo@sony.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;
as well as URLs for NNTP newsgroup(s).