]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
NFSv4: Don't trigger uneccessary scans for return-on-close delegations
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Tue, 18 Feb 2025 21:50:30 +0000 (16:50 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:32:01 +0000 (14:32 +0200)
commit257fd2aa28936221d5630a514414da3be6484186
tree3b1fb01a5fece83cb67c4df32b0f67163a86f164
parent17c99ab3db2ba74096d36c69daa6e784e98fc0b8
NFSv4: Don't trigger uneccessary scans for return-on-close delegations

[ Upstream commit 47acca884f714f41d95dc654f802845544554784 ]

The amount of looping through the list of delegations is occasionally
leading to soft lockups. Avoid at least some loops by not requiring the
NFSv4 state manager to scan for delegations that are marked for
return-on-close. Instead, either mark them for immediate return (if
possible) or else leave it up to nfs4_inode_return_delegation_on_close()
to return them once the file is closed by the application.

Fixes: b757144fd77c ("NFSv4: Be less aggressive about returning delegations for open files")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/delegation.c