aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfsd/nfs4state.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index b583e4e800ab..3cf9900d5f32 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -771,7 +771,9 @@ static struct nfsd4_session *alloc_init_session(struct svc_rqst *rqstp, struct n
771 idx = hash_sessionid(&new->se_sessionid); 771 idx = hash_sessionid(&new->se_sessionid);
772 spin_lock(&client_lock); 772 spin_lock(&client_lock);
773 list_add(&new->se_hash, &sessionid_hashtbl[idx]); 773 list_add(&new->se_hash, &sessionid_hashtbl[idx]);
774 spin_lock(&clp->cl_lock);
774 list_add(&new->se_perclnt, &clp->cl_sessions); 775 list_add(&new->se_perclnt, &clp->cl_sessions);
776 spin_unlock(&clp->cl_lock);
775 spin_unlock(&client_lock); 777 spin_unlock(&client_lock);
776 778
777 status = nfsd4_new_conn(rqstp, new); 779 status = nfsd4_new_conn(rqstp, new);
@@ -819,7 +821,9 @@ static void
819unhash_session(struct nfsd4_session *ses) 821unhash_session(struct nfsd4_session *ses)
820{ 822{
821 list_del(&ses->se_hash); 823 list_del(&ses->se_hash);
824 spin_lock(&ses->se_client->cl_lock);
822 list_del(&ses->se_perclnt); 825 list_del(&ses->se_perclnt);
826 spin_unlock(&ses->se_client->cl_lock);
823} 827}
824 828
825/* must be called under the client_lock */ 829/* must be called under the client_lock */
@@ -925,8 +929,10 @@ unhash_client_locked(struct nfs4_client *clp)
925 929
926 mark_client_expired(clp); 930 mark_client_expired(clp);
927 list_del(&clp->cl_lru); 931 list_del(&clp->cl_lru);
932 spin_lock(&clp->cl_lock);
928 list_for_each_entry(ses, &clp->cl_sessions, se_perclnt) 933 list_for_each_entry(ses, &clp->cl_sessions, se_perclnt)
929 list_del_init(&ses->se_hash); 934 list_del_init(&ses->se_hash);
935 spin_unlock(&clp->cl_lock);
930} 936}
931 937
932static void 938static void