aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfsd/nfs4callback.c1
-rw-r--r--fs/nfsd/nfs4state.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index 1d5051d46b46..77bc9d3c80fd 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
@@ -718,6 +718,7 @@ void nfsd4_destroy_callback_queue(void)
718 destroy_workqueue(callback_wq); 718 destroy_workqueue(callback_wq);
719} 719}
720 720
721/* must be called under the state lock */
721void nfsd4_set_callback_client(struct nfs4_client *clp, struct rpc_clnt *new) 722void nfsd4_set_callback_client(struct nfs4_client *clp, struct rpc_clnt *new)
722{ 723{
723 struct rpc_clnt *old = clp->cl_cb_client; 724 struct rpc_clnt *old = clp->cl_cb_client;
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index cc0e9117dd16..ede9dde52fe8 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1427,8 +1427,10 @@ nfsd4_destroy_session(struct svc_rqst *r,
1427 unhash_session(ses); 1427 unhash_session(ses);
1428 spin_unlock(&client_lock); 1428 spin_unlock(&client_lock);
1429 1429
1430 nfs4_lock_state();
1430 /* wait for callbacks */ 1431 /* wait for callbacks */
1431 nfsd4_set_callback_client(ses->se_client, NULL); 1432 nfsd4_set_callback_client(ses->se_client, NULL);
1433 nfs4_unlock_state();
1432 nfsd4_put_session(ses); 1434 nfsd4_put_session(ses);
1433 status = nfs_ok; 1435 status = nfs_ok;
1434out: 1436out: