]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
NFS4: Fix v4.0 client state corruption when mount
authorZhangXiaoxu <zhangxiaoxu5@huawei.com>
Mon, 6 May 2019 03:57:03 +0000 (11:57 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Jun 2019 10:23:45 +0000 (12:23 +0200)
commit4676a07add0840752af682a0f949fb560bd3b34f
tree3251b103219234e474439075f09d0a3a67a614e2
parente8623e7a8f4b3acf44ecbf64a013a06454f2b4f1
NFS4: Fix v4.0 client state corruption when mount

commit f02f3755dbd14fb935d24b14650fff9ba92243b8 upstream.

stat command with soft mount never return after server is stopped.

When alloc a new client, the state of the client will be set to
NFS4CLNT_LEASE_EXPIRED.

When the server is stopped, the state manager will work, and accord
the state to recover. But the state is NFS4CLNT_LEASE_EXPIRED, it
will drain the slot table and lead other task to wait queue, until
the client recovered. Then the stat command is hung.

When discover server trunking, the client will renew the lease,
but check the client state, it lead the client state corruption.

So, we need to call state manager to recover it when detect server
ip trunking.

Signed-off-by: ZhangXiaoxu <zhangxiaoxu5@huawei.com>
Cc: stable@vger.kernel.org
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/nfs4state.c