]> git.baikalelectronics.ru Git - kernel.git/commit
NFSv4: Fix a deadlock between nfs4_open_recover_helper() and delegreturn
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Fri, 4 Nov 2022 17:20:01 +0000 (13:20 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:41:07 +0000 (11:41 +0100)
commit24a140ce8c3e18d0c28f63e4e726164c55b603ee
tree7ee4cf1485103b7c793319e6be223e3bb2b3bc55
parent6338f76bb520a37575fa6f3b4f68814da84f1517
NFSv4: Fix a deadlock between nfs4_open_recover_helper() and delegreturn

[ Upstream commit 51069e4aef6257b0454057359faed0ab0c9af083 ]

If we're asked to recover open state while a delegation return is
outstanding, then the state manager thread cannot use a cached open, so
if the server returns a delegation, we can end up deadlocked behind the
pending delegreturn.
To avoid this problem, let's just ask the server not to give us a
delegation unless we're explicitly reclaiming one.

Fixes: edc2d2f52cc9 ("NFSv4: nfs4_open_recover_helper() must set share access")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/nfs4proc.c