The following 5 patches, which may depend on some of the earlier patches I have sent, introduce new interfaces for requesting name-based operations on directories (create, remove, rename). They generally combine the lookup and the lock operations and return a dentry which is "locked". Currently a dentry is always locked by locking the parent directory. Once all clients are converted to use these interfaces we will be free to change the details of the locking. My proposal is to lock just the relevant dentrys in a manner somewhat similar to the way that d_in_lookup() dentrys are currently locked. After the intended operation is completed (or aborted) the dentry is unlocked with dentry_unlock(). This currently unlocks the parent directory and dputs the dentry. It is because the unlock is given just the dentry, that one of my earlier patches changed vfs_mkdir() to drop the lock when it consumes the dentry without replacing it (i.e. in case of error). In that case there is nothing to pass to dentry_unlock(). I have a follow-on set of patches which change various parts of the kernel to use these APIs instead of directly locking the parent. They cover smb/server, nfsd, cachefiles, debugfs, binderfs, binfmt_misc, kernel/bpf, devpts, fuse, infiniband.../qib_fs, ipc/mqueue, fs/proc, s390/hypfs, security, sunrpc/rpc_pipe, xfs, tracefs. overlayfs needs some rearrangement of locking before it can be converted - that is on my short-list of tasks. I don't plan on a full submission of these APIs until that is completed, in case I find a need for changes. Thanks, NeilBrown [PATCH 1/5] VFS: introduce lookup_and_lock() and friends [PATCH 2/5] VFS/btrfs: add lookup_and_lock_killable() [PATCH 3/5] VFS: change old_dir and new_dir in struct renamedata to [PATCH 4/5] VFS: add lookup_and_lock_rename() [PATCH 5/5] VFS: introduce lock_and_check_dentry()