Re: [PATCH v4 09/17] vfs: add struct createdata for passing arguments to vfs_create()
From: NeilBrown
Date: Mon Nov 03 2025 - 19:38:04 EST
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