[PATCH v4 0/9] nfs: prepare for locking changes.
From: NeilBrown
Date: Wed Oct 28 2026 - 00:11:17 EST
Now that the requirement for this are upstream this could go via the NFS
tree or the VFS tree.
Thanks,
NeilBrown
This v4 fixes the problems with patch 1 which Jonathan Flynn helped me
to understand. And *actually* adds Anna's Acked-by.
Before this v3 fixed three bugs found by Sashiko - all
error-path related.
1/ patch 5 - make sure d_drop() gets called in all error cases
2/ patch 8 - dput() sdentry on all error paths
3/ patch 9 - check error return from d_duplicate() correctly.
Original intro:
I am working on changes to directory locking. The medium term goal is
to lift d_alloc_parallel() locking above i_rwsem, so d_alloc_paralle()
can be run unlocked, and consequently cannot be called when ->i_rwsem is
held.
The requires:
1/ the d_alloc_parallel() not be called while i_rwsem is held. NFS does
this in a few places. New interfaces d_alloc_trylock() and d_duplicate()
are now available and can be used instead.
2/ a dentry must not be d_drop()ed while an operation is ongoing, as an
unlocked d_alloc_parallel() would then be able to create a new
dentry with the same name. In particular d_rehash() must be phased
out as it won't be safe. Various techiniques are used to avoid the
need for d_drop(), particularly that d_splice_alias() is now able to
splice a hashed alias.
Further, the first two patches here fixes bugs that I found while
developing and reviewing these changes.
[PATCH v4 1/9] nfs: fix open-blocking with d_fsdata
[PATCH v4 2/9] nfs: fix nfs_call_unlink()
[PATCH v4 3/9] nfs: remove d_drop()/d_alloc_parallel() from
[PATCH v4 4/9] nfs: use d_splice_alias() in nfs_link()
[PATCH v4 5/9] nfs: don't d_drop() before d_splice_alias()
[PATCH v4 6/9] nfs: don't d_drop() before d_splice_alias() in
[PATCH v4 7/9] nfs: Use d_alloc_trylock() in nfs_prime_dcache()
[PATCH v4 8/9] nfs: use d_alloc_trylock() in silly-rename
[PATCH v4 9/9] nfs: use d_duplicate()