aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4state.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-11-21 09:22:14 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-11-21 09:28:42 -0500
commit5df904aeb0d9baad90e78fc730dfe1afa4996005 (patch)
tree6586e2b5604d6bb49e507129207ab0b6dc090a8d /fs/nfs/nfs4state.c
parent6bdb5f213c4344324f600dde885f25768fbd14db (diff)
NFSv4.1: Handle session reset and bind_conn_to_session before lease check
We can't send a SEQUENCE op unless the session is OK, so it is pointless to handle the CHECK_LEASE state before we've dealt with SESSION_RESET and BIND_CONN_TO_SESSION. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4state.c')
-rw-r--r--fs/nfs/nfs4state.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index e0a28dffd29d..f3d1bc48c9c4 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -2114,15 +2114,6 @@ static void nfs4_state_manager(struct nfs_client *clp)
2114 continue; 2114 continue;
2115 } 2115 }
2116 2116
2117 if (test_and_clear_bit(NFS4CLNT_CHECK_LEASE, &clp->cl_state)) {
2118 section = "check lease";
2119 status = nfs4_check_lease(clp);
2120 if (status < 0)
2121 goto out_error;
2122 if (test_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state))
2123 continue;
2124 }
2125
2126 /* Initialize or reset the session */ 2117 /* Initialize or reset the session */
2127 if (test_and_clear_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state)) { 2118 if (test_and_clear_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state)) {
2128 section = "reset session"; 2119 section = "reset session";
@@ -2143,6 +2134,14 @@ static void nfs4_state_manager(struct nfs_client *clp)
2143 continue; 2134 continue;
2144 } 2135 }
2145 2136
2137 if (test_and_clear_bit(NFS4CLNT_CHECK_LEASE, &clp->cl_state)) {
2138 section = "check lease";
2139 status = nfs4_check_lease(clp);
2140 if (status < 0)
2141 goto out_error;
2142 continue;
2143 }
2144
2146 /* Recall session slots */ 2145 /* Recall session slots */
2147 if (test_and_clear_bit(NFS4CLNT_RECALL_SLOT, &clp->cl_state)) { 2146 if (test_and_clear_bit(NFS4CLNT_RECALL_SLOT, &clp->cl_state)) {
2148 section = "recall slot"; 2147 section = "recall slot";