NFS: Fix a soft lockup in the delegation recovery code
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 21 Feb 2019 19:51:25 +0000 (14:51 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jan 2020 13:50:27 +0000 (14:50 +0100)
commit341e4f3e3599563b3a246f7c04589f717dc26cd3
tree3386f385f58cda928f256fa7ce642bcc92b56c9f
parentcd35b9353f143b78416e1246f6e92e106b429492
NFS: Fix a soft lockup in the delegation recovery code

[ Upstream commit 6f9449be53f3ce383caed797708b332ede8d952c ]

Fix a soft lockup when NFS client delegation recovery is attempted
but the inode is in the process of being freed. When the
igrab(inode) call fails, and we have to restart the recovery process,
we need to ensure that we won't attempt to recover the same delegation
again.

Fixes: 45870d6909d5a ("NFSv4.1: Test delegation stateids when server...")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/delegation.c
fs/nfs/delegation.h