diff mbox

[v2,6/7] NFSD: Don't call nfsd4_sequence_adjust_slot_table under the client_lock

Message ID 1355251459-18034-6-git-send-email-Trond.Myklebust@netapp.com (mailing list archive)
State New, archived
Headers show

Commit Message

Trond Myklebust Dec. 11, 2012, 6:44 p.m. UTC
We may have to grow the session table.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
---
 fs/nfsd/nfs4state.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index a380a61..ed937c8 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2224,10 +2224,6 @@  nfsd4_sequence(struct svc_rqst *rqstp,
 	else
 		slot->sl_flags &= ~NFSD4_SLOT_CACHETHIS;
 
-	/* Adjust slot table, and retrieve new target/highest slotid values */
-	nfsd4_sequence_adjust_slot_table(session, slot,
-			seq->highest_slotid, seq);
-
 	cstate->slot = slot;
 	cstate->session = session;
 
@@ -2251,6 +2247,11 @@  out:
 	}
 	kfree(conn);
 	spin_unlock(&client_lock);
+	/* Adjust slot table, and retrieve new target/highest slotid values */
+	if (cstate->session)
+		nfsd4_sequence_adjust_slot_table(cstate->session,
+				cstate->slot, seq->highest_slotid, seq);
+
 	dprintk("%s: return %d\n", __func__, ntohl(status));
 	return status;
 }