]> 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:33:36 +0000 (14:33 +0200)
commita2851808730b5c1dd536f6aa71f90f223c151fee
tree670a8638cbd9e175518836067f63025953dcde62
parenta34f52b7d5213e2794c946bbacd2c14aa131fa57
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