Re: [PATCH v5 09/17] vfs: clean up argument list for vfs_create()

Jeff Layton <[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 Thu, 2025-11-06 at 08:27 +1100, NeilBrown wrote:
> On Thu, 06 Nov 2025, Jeff Layton wrote:
> > As Neil points out:
> > 
> > "I would be in favour of dropping the "dir" arg because it is always
> > d_inode(dentry->d_parent) which is stable."
> > 
> > ...and...
> > 
> > "Also *every* caller of vfs_create() passes ".excl = true".  So maybe we
> > don't need that arg at all."
> > 
> > Drop both arguments from vfs_create() and fix up the callers.
> > 
> > Suggested-by: NeilBrown <[email protected]>
> > Signed-off-by: Jeff Layton <[email protected]>
> 
> This I like.
> 
> Reviewed-by: NeilBrown <[email protected]>
> 
> It would be consistent to also remove the 'dir' arg from vfs_mkdir(),
> vfs_mknod(), etc.  I wouldn't do that until we find out what other
> people think of the change.
> 

I was thinking that too. I can roll patches to do those as well, but at
this point I think I'd rather do that on top of this series rather than
in the context of it.
-- 
Jeff Layton <[email protected]>
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.