NFSv4: Fix a state manager thread deadlock regression
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Sun, 24 Sep 2023 17:14:15 +0000 (13:14 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Oct 2023 20:00:35 +0000 (22:00 +0200)
commit89f2ace6d016d2aac29af621069a41c1583382ce
tree239cc45abcd26445eda1b46882ec56497e35f221
parent80ba4fd1ac33190381b17221fbe2ebcabf4777b2
NFSv4: Fix a state manager thread deadlock regression

[ Upstream commit 956fd46f97d238032cb5fa4771cdaccc6e760f9a ]

Commit 4dc73c679114 reintroduces the deadlock that was fixed by commit
aeabb3c96186 ("NFSv4: Fix a NFSv4 state manager deadlock") because it
prevents the setup of new threads to handle reboot recovery, while the
older recovery thread is stuck returning delegations.

Fixes: 4dc73c679114 ("NFSv4: keep state manager thread active if swap is enabled")
Cc: stable@vger.kernel.org
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/nfs4proc.c
fs/nfs/nfs4state.c