aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorZhangXiaoxu <zhangxiaoxu5@huawei.com>2019-05-05 23:57:03 -0400
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2019-05-09 16:26:05 -0400
commitf02f3755dbd14fb935d24b14650fff9ba92243b8 (patch)
tree3226baca94a8477bf7b9e7a66b18aaff1d51a318 /fs/nfs
parentb1029c9bc078a6f1515f55dd993b507dcc7e3440 (diff)
NFS4: Fix v4.0 client state corruption when mount
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>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/nfs4state.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 3de36479ed7a..f502f1c054cf 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -159,6 +159,10 @@ int nfs40_discover_server_trunking(struct nfs_client *clp,
159 /* Sustain the lease, even if it's empty. If the clientid4 159 /* Sustain the lease, even if it's empty. If the clientid4
160 * goes stale it's of no use for trunking discovery. */ 160 * goes stale it's of no use for trunking discovery. */
161 nfs4_schedule_state_renewal(*result); 161 nfs4_schedule_state_renewal(*result);
162
163 /* If the client state need to recover, do it. */
164 if (clp->cl_state)
165 nfs4_schedule_state_manager(clp);
162 } 166 }
163out: 167out:
164 return status; 168 return status;