]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
NFS: Don't immediately return directory delegations when disabled
authorAnna Schumaker <anna.schumaker@oracle.com>
Fri, 9 Jan 2026 20:41:14 +0000 (15:41 -0500)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 12 Jan 2026 16:50:22 +0000 (11:50 -0500)
commit803e18641fd444a614415711a5af53dcde21104b
tree634a09f2a06631cf417b3082c5e9e66c1ff8f752
parent60699ab7cbf0a4eb19929cce243002b39c67917d
NFS: Don't immediately return directory delegations when disabled

The function nfs_inode_evict_delegation() immediately and synchronously
returns a delegation when called. This means we can't call it from
nfs4_have_delegation(), since that function could be called under a
lock. Instead we should mark the delegation for return and let the state
manager handle it for us.

Fixes: b6d2a520f463 ("NFS: Add a module option to disable directory delegations")
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/delegation.c