|
|
Log in / Subscribe / Register

Create and use APIs to centralise locking for directory ops.

From:  NeilBrown <neilb-AT-ownmail.net>
To:  "Alexander Viro" <viro-AT-zeniv.linux.org.uk>, "Christian Brauner" <brauner-AT-kernel.org>, "Amir Goldstein" <amir73il-AT-gmail.com>, Jeff Layton <jlayton-AT-kernel.org>
Subject:  [PATCH v2 00/14] Create and use APIs to centralise locking for directory ops.
Date:  Wed, 15 Oct 2025 12:46:52 +1100
Message-ID:  <20251015014756.2073439-1-neilb@ownmail.net>
Cc:  "Jan Kara" <jack-AT-suse.cz>, linux-fsdevel-AT-vger.kernel.org
Archive-link:  Article

Here is a new series in response to review (thanks!).

The series creates a number of interfaces that combine locking and lookup, or
sometimes do the locking without lookup.
After this series there are still a few places where non-VFS code knows
about the locking rules.  Places that call simple_start_creating()
still have explicit unlock on the parent (I think).  Al is doing work
on those places so I'll wait until he is finished.
Also there explicit locking one place in nfsd which is changed by an
in-flight patch.  That lands it can be updated to use these interfaces.

The first patch here should have been part of the last patch of the
previous series - sorry for leaving it out.

I've combined the new interface with changes is various places to use
the new interfaces.  I think it is easier to reveiew the design that way.
If necessary I can split these out to have separate patches for each place
that new APIs are used if the general design is accepted.

NeilBrown

 [PATCH v2 01/14] debugfs: rename end_creating() to
 [PATCH v2 02/14] VFS: introduce start_dirop() and end_dirop()
 [PATCH v2 03/14] VFS: tidy up do_unlinkat()
 [PATCH v2 04/14] VFS/nfsd/cachefiles/ovl: add start_creating() and
 [PATCH v2 05/14] VFS/nfsd/cachefiles/ovl: introduce start_removing()
 [PATCH v2 06/14] VFS: introduce start_creating_noperm() and
 [PATCH v2 07/14] VFS: introduce start_removing_dentry()
 [PATCH v2 08/14] VFS: add start_creating_killable() and
 [PATCH v2 09/14] VFS/nfsd/ovl: introduce start_renaming() and
 [PATCH v2 10/14] VFS/ovl/smb: introduce start_renaming_dentry()
 [PATCH v2 11/14] Add start_renaming_two_dentries()
 [PATCH v2 12/14] ecryptfs: use new start_creating/start_removing APIs
 [PATCH v2 13/14] VFS: change vfs_mkdir() to unlock on failure.
 [PATCH v2 14/14] VFS: introduce end_creating_keep()



Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds