summaryrefslogtreecommitdiff
path: root/fs/nfs/nfs4state.c
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2009-12-04 16:02:14 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2009-12-04 16:02:14 -0500
commit0b9e2d41f1f0360be08809d4e3bb56b67be6241a (patch)
tree6628c9ef423cf09a76ec34b6f9db64c7ca704c38 /fs/nfs/nfs4state.c
parent691daf3b0c410c8bcab6735796be03ea446e1924 (diff)
downloadlwn-0b9e2d41f1f0360be08809d4e3bb56b67be6241a.tar.gz
lwn-0b9e2d41f1f0360be08809d4e3bb56b67be6241a.zip
nfs41: only state manager sets NFS4CLNT_SESSION_SETUP
Replace sync and async handlers setting of the NFS4CLNT_SESSION_SETUP bit with setting NFS4CLNT_CHECK_LEASE, and let the state manager decide to reset the session. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4state.c')
-rw-r--r--fs/nfs/nfs4state.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 3c1433598b60..46c69e2248e3 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -1094,6 +1094,8 @@ static int nfs4_recovery_handle_error(struct nfs_client *clp, int error)
case -NFS4ERR_SEQ_FALSE_RETRY:
case -NFS4ERR_SEQ_MISORDERED:
set_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state);
+ /* Zero session reset errors */
+ return 0;
}
return error;
}
@@ -1191,7 +1193,6 @@ static int nfs4_reset_session(struct nfs_client *clp)
set_bit(NFS4CLNT_SESSION_DRAINING, &clp->cl_state);
spin_unlock(&tbl->slot_tbl_lock);
status = wait_for_completion_interruptible(&ses->complete);
- clear_bit(NFS4CLNT_SESSION_DRAINING, &clp->cl_state);
if (status) /* -ERESTARTSYS */
goto out;
} else {
@@ -1212,6 +1213,7 @@ static int nfs4_reset_session(struct nfs_client *clp)
/* fall through*/
out:
/* Wake up the next rpc task even on error */
+ clear_bit(NFS4CLNT_SESSION_DRAINING, &clp->cl_state);
rpc_wake_up_next(&clp->cl_session->fc_slot_table.slot_tbl_waitq);
return status;
}