[GIT PULL 03/12 for v7.1] vfs directory

From: Christian Brauner

Date: Fri Apr 10 2026 - 11:26:22 EST


Hey Linus,

/* Summary */

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 the core vfs
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.

/* Testing */

gcc (Debian 14.2.0-19) 14.2.0
Debian clang version 19.1.7 (3+b1)

No build failures or warnings were observed.

/* Conflicts */

Merge conflicts with mainline
=============================

diff --cc security/apparmor/apparmorfs.c
index 242c71b3fb6e,f93c4f31d02a..000000000000
--- a/security/apparmor/apparmorfs.c
+++ b/security/apparmor/apparmorfs.c
@@@ -364,22 -289,13 +358,17 @@@ static struct dentry *aafs_create(cons
}

error = __aafs_setup_d_inode(dir, dentry, mode, data, link, fops, iops);
+ simple_done_creating(dentry);
if (error)
- goto fail_dentry;
- inode_unlock(dir);
+ goto fail;
+
+ if (data)
+ aa_get_common_ref(data);
+
return dentry;

- fail_dentry:
- dput(dentry);
-
- fail_lock:
- inode_unlock(dir);
+ fail:
simple_release_fs(&aafs_mnt, &aafs_count);
-
return ERR_PTR(error);
}

Merge conflicts with other trees
================================

[1]: https://lore.kernel.org/linux-next/adZNhv68QCxJt00c@xxxxxxxxxxxxx

The following changes since commit 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f:

Linux 7.0-rc1 (2026-02-22 13:18:59 -0800)

are available in the Git repository at:

git@xxxxxxxxxxxxxxxxxxx:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-7.1-rc1.directory

for you to fetch changes up to 9c62536a958ffef246b6f7c01125ebac962158f8:

Merge patch series "Further centralising of directory locking for name ops." (2026-03-09 09:43:04 +0100)

----------------------------------------------------------------
vfs-7.1-rc1.directory

Please consider pulling these changes from the signed vfs-7.1-rc1.directory tag.

Thanks!
Christian

----------------------------------------------------------------
Christian Brauner (1):
Merge patch series "Further centralising of directory locking for name ops."

NeilBrown (15):
VFS: note error returns in documentation for various lookup functions
fs/proc: Don't lock root inode when creating "self" and "thread-self"
VFS: move the start_dirop() kerndoc comment to before start_dirop()
libfs: change simple_done_creating() to use end_creating()
Apparmor: Use simple_start_creating() / simple_done_creating()
selinux: Use simple_start_creating() / simple_done_creating()
nfsd: switch purge_old() to use start_removing_noperm()
VFS: make lookup_one_qstr_excl() static.
ovl: Simplify ovl_lookup_real_one()
cachefiles: change cachefiles_bury_object to use start_renaming_dentry()
ovl: pass name buffer to ovl_start_creating_temp()
ovl: change ovl_create_real() to get a new lock when re-opening created file.
ovl: use is_subdir() for testing if one thing is a subdir of another
ovl: remove ovl_lock_rename_workdir()
VFS: unexport lock_rename(), lock_rename_child(), unlock_rename()

Documentation/filesystems/porting.rst | 14 ++++++
fs/cachefiles/namei.c | 93 ++++++++++++-----------------------
fs/libfs.c | 3 +-
fs/namei.c | 70 +++++++++++++++++---------
fs/nfsd/nfs4recover.c | 6 +--
fs/overlayfs/dir.c | 51 ++++++++++++-------
fs/overlayfs/export.c | 71 +++++++++++++-------------
fs/overlayfs/overlayfs.h | 10 +---
fs/overlayfs/super.c | 16 +++---
fs/overlayfs/util.c | 25 ----------
fs/proc/self.c | 3 --
fs/proc/thread_self.c | 3 --
include/linux/namei.h | 6 ---
security/apparmor/apparmorfs.c | 35 +++----------
security/selinux/selinuxfs.c | 17 +++----
15 files changed, 184 insertions(+), 239 deletions(-)