[PATCH 00/13] Further centralising of directory locking for name ops.

NeilBrown
2026-02-04T05:08:07Z

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 01/13] fs/proc: Don't lock root inode when creating "self" and
[PATCH 02/13] VFS: move the start_dirop() kerndoc comment to before
[PATCH 03/13] libfs: change simple_done_creating() to use
[PATCH 04/13] Apparmor: Use simple_start_creating() /
[PATCH 05/13] selinux: Use simple_start_creating() /
[PATCH 06/13] nfsd: switch purge_old() to use start_removing_noperm()
[PATCH 07/13] VFS: make lookup_one_qstr_excl() static.
[PATCH 08/13] ovl: Simplify ovl_lookup_real_one()
[PATCH 09/13] cachefiles: change cachefiles_bury_object to use
[PATCH 10/13] ovl: change ovl_create_real() to get a new lock when
[PATCH 11/13] ovl: use is_subdir() for testing if one thing is a
[PATCH 12/13] ovl: remove ovl_lock_rename_workdir()
[PATCH 13/13] VFS: unexport lock_rename(), lock_rename_child(),