[PATCH v2 00/15] Further centralising of directory locking for name ops.
NeilBrown
neilb at ownmail.net
Mon Feb 23 01:06:15 UTC 2026
This is v2 of a series I sent shortly before the merge-window opened,
and now that it has closed ....
I have added:
01/15 to improve documentation as suggested by Darrick
11/15 as discussed with Amir to simplify the following patch
various RB and AB (thanks Jeff in particular)
I'm hoping this could land in vfs/ shortly (tihs month?). I will then have another
series of patches which make a small start in changing the locking
rules, which hopefully can also land in the next merge window.
Original patch description below.
Thanks,
NeilBrown
I am working towards changing the locking rules for name-operations: locking
the name rather than the whole directory.
The current part of this process is centralising all the locking so that
it can be changed in one place.
Recently "start_creating", "start_removing", "start_renaming" and related
interaces were added which combine the locking and the lookup. At that time
many callers were changed to use the new interfaces. However there are still
an assortment of places out side of fs/namei.c where the directory is locked
explictly, whether with inode_lock() or lock_rename() or similar. These were
missed in the first pass for an assortment of uninteresting reasons.
This series addresses the remaining places where explicit locking is
used, and changes them to use the new interfaces, or otherwise removes
the explicit locking.
The biggest changes are in overlayfs. The other changes are quite
simple, though maybe the cachefiles changes is the least simple of those.
I'm running the --overlay tests in xfstests and nothing has popped yet.
I'll continue with this and run some NFS tests too.
Thanks for your review of these patches!
NeilBrown
[PATCH v2 01/15] VFS: note error returns is documentation for various
[PATCH v2 02/15] fs/proc: Don't lock root inode when creating "self"
[PATCH v2 03/15] VFS: move the start_dirop() kerndoc comment to
[PATCH v2 04/15] libfs: change simple_done_creating() to use
[PATCH v2 05/15] Apparmor: Use simple_start_creating() /
[PATCH v2 06/15] selinux: Use simple_start_creating() /
[PATCH v2 07/15] nfsd: switch purge_old() to use
[PATCH v2 08/15] VFS: make lookup_one_qstr_excl() static.
[PATCH v2 09/15] ovl: Simplify ovl_lookup_real_one()
[PATCH v2 10/15] cachefiles: change cachefiles_bury_object to use
[PATCH v2 11/15] ovl: pass name buffer to ovl_start_creating_temp()
[PATCH v2 12/15] ovl: change ovl_create_real() to get a new lock when
[PATCH v2 13/15] ovl: use is_subdir() for testing if one thing is a
[PATCH v2 14/15] ovl: remove ovl_lock_rename_workdir()
[PATCH v2 15/15] VFS: unexport lock_rename(), lock_rename_child(),
More information about the Linux-security-module-archive
mailing list