Re: [PATCH v4 09/17] vfs: add struct createdata for passing arguments to vfs_create()

NeilBrown <[email protected]>
Newsgroups org.kernel.vger.ecryptfs,dev.linux.lists.netfs,org.kernel.vger.linux-cifs,org.kernel.vger.linux-fsdevel,org.kernel.vger.linux-kernel,org.kernel.vger.linux-nfs,org.kernel.vger.linux-unionfs,org.kernel.vger.linux-xfs,org.kernel.vger.netdev
Message-ID <[email protected]>
On Tue, 04 Nov 2025, NeilBrown wrote:
> On Mon, 03 Nov 2025, Jeff Layton wrote:
> > vfs_create() has grown an uncomfortably long argument list, and a
> > following patch will add another. Convert it to take a new struct
> > createdata pointer and fix up the callers to pass one in.
> > 
> 
> I know Christian asked for this and he is a Maintainer so.....
> 
> but I would like say that I don't think this is a win.  The argument
> list isn't *that* long, and all the args are quite different so there is
> little room for confusion.
> 
> I would be in favour of dropping the "dir" arg because it is always
>    d_inode(dentry->d_parent)
> which is stable.
> 
> I would rather pass the vfsmnt rather than the idmap, then we could pass
> "struct path", for both that and dentry, but I know Christian disagrees.
> 
> So if anyone really thinks the arg list is too long, I think there are
> better solutions.  But I don't even think the length is a problem.

Also *every* caller of vfs_create() passes ".excl = true".  So maybe we
don't need that arg at all.

I think that the last time false might have been passed to vfs_create()
was before

Commit ce8644fcadc5 ("lookup_open(): expand the call of vfs_create()")

NeilBrown
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.