Re: [PATCH v6 00/15] Create and use APIs to centralise locking for directory ops

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-security-module,org.kernel.vger.linux-unionfs,org.kernel.vger.linux-xfs,org.kernel.vger.selinux
Message-ID <[email protected]>
On Fri, 14 Nov 2025, Christian Brauner wrote:
> On Thu, Nov 13, 2025 at 11:18:23AM +1100, NeilBrown wrote:
> > Following is a new version of this series:
> >  - fixed a bug found by syzbot
> >  - cleanup suggested by Stephen Smalley
> >  - added patch for missing updates in smb/server - thanks Jeff Layton
> 
> The codeflow right now is very very gnarly in a lot of places which
> obviously isn't your fault. But start_creating() and end_creating()
> would very naturally lend themselves to be CLASS() guards.

I agree that using guards would be nice.  One of my earlier versions did
that but Al wants the change to use guards to be separate from other
changes.  I'll suggest something at some stage if no-one else does it first.

> 
> Unrelated: I'm very inclined to slap a patch on top that renames
> start_creating()/end_creating() and start_dirop()/end_dirop() to
> vfs_start_creating()/vfs_end_creating() and
> vfs_start_dirop()/vfs_end_dirop(). After all they are VFS level
> maintained helpers and I try to be consistent with the naming in the
> codebase making it very easy to grep.
> 

I don't object to adding a vfs_ prefix.
(What would be really nice is of the vfs_ code was in a separate vfs/
directory, but that is probably too intrusive to be worth it).

Thanks,
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.