]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
NFS: make nfs_mark_return_unreferenced_delegations less aggressive
authorChristoph Hellwig <hch@lst.de>
Wed, 7 Jan 2026 07:27:15 +0000 (08:27 +0100)
committerAnna Schumaker <anna.schumaker@oracle.com>
Tue, 20 Jan 2026 19:49:47 +0000 (14:49 -0500)
commita13bc3286cb380aeca0d68dcb80d7611520e0b9e
tree0c16e3c1600d93bad20d222cecb58541da0e4d61
parent300ca8123c901605eda5eba33c83dc6eb03d0a3c
NFS: make nfs_mark_return_unreferenced_delegations less aggressive

Currently nfs_mark_return_unreferenced_delegations marks all open but
not referenced delegations (i.e., those were found by a previous pass)
as return on close, which means that we'll return them on close without
a way out.

Replace this with only iterating delegations that are on the LRU list,
and avoid delegations that are in use by an open files to avoid this.

Delegations that were never referenced while open still are be prime
candidates for return from the LRU if the number of delegations is over
the watermark, or otherwise will be returned by the next
nfs_mark_return_unreferenced_delegations pass after they are closed.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
fs/nfs/delegation.c