summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4state.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2015-03-27 09:46:03 +0100
committerIngo Molnar <mingo@kernel.org>2015-03-27 09:46:03 +0100
commit072e5a1cfabca7276744d24726e094d85721df5c (patch)
treec7237fa143f72273aa8a8179f741c24b9072001c /fs/nfs/nfs4state.c
parent294fe0f52a44c6f207211de0686c369a961b5533 (diff)
parentd525211f9d1be8b523ec7633f080f2116f5ea536 (diff)
downloadlinux-stable-072e5a1cfabca7276744d24726e094d85721df5c.tar.gz
linux-stable-072e5a1cfabca7276744d24726e094d85721df5c.tar.bz2
linux-stable-072e5a1cfabca7276744d24726e094d85721df5c.zip
Merge branch 'perf/urgent' into perf/core, to pick up fixes and to refresh the tree
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'fs/nfs/nfs4state.c')
-rw-r--r--fs/nfs/nfs4state.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 5ad908e9ce9c..f95e3b58bbc3 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -346,9 +346,23 @@ int nfs41_discover_server_trunking(struct nfs_client *clp,
status = nfs4_proc_exchange_id(clp, cred);
if (status != NFS4_OK)
return status;
- set_bit(NFS4CLNT_LEASE_CONFIRM, &clp->cl_state);
- return nfs41_walk_client_list(clp, result, cred);
+ status = nfs41_walk_client_list(clp, result, cred);
+ if (status < 0)
+ return status;
+ if (clp != *result)
+ return 0;
+
+ /* Purge state if the client id was established in a prior instance */
+ if (clp->cl_exchange_flags & EXCHGID4_FLAG_CONFIRMED_R)
+ set_bit(NFS4CLNT_PURGE_STATE, &clp->cl_state);
+ else
+ set_bit(NFS4CLNT_LEASE_CONFIRM, &clp->cl_state);
+ nfs4_schedule_state_manager(clp);
+ status = nfs_wait_client_init_complete(clp);
+ if (status < 0)
+ nfs_put_client(clp);
+ return status;
}
#endif /* CONFIG_NFS_V4_1 */