]> 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:37:34 +0000 (14:37 +0200)
commit4e2a03d766f13366b4893c637ed26d8a862fe9af
treee916f70683329e0f03d124f1de0436b039d53c98
parentd03ce46090f687c56f5bb55be6bd3d135ebe10fc
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