aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfsd/nfs4state.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 48fbdac33c7c..e706c6961691 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -358,9 +358,22 @@ alloc_client(struct xdr_netobj name)
358 return clp; 358 return clp;
359} 359}
360 360
361static void
362shutdown_callback_client(struct nfs4_client *clp)
363{
364 struct rpc_clnt *clnt = clp->cl_callback.cb_client;
365
366 /* shutdown rpc client, ending any outstanding recall rpcs */
367 if (clnt) {
368 clp->cl_callback.cb_client = NULL;
369 rpc_shutdown_client(clnt);
370 }
371}
372
361static inline void 373static inline void
362free_client(struct nfs4_client *clp) 374free_client(struct nfs4_client *clp)
363{ 375{
376 shutdown_callback_client(clp);
364 if (clp->cl_cred.cr_group_info) 377 if (clp->cl_cred.cr_group_info)
365 put_group_info(clp->cl_cred.cr_group_info); 378 put_group_info(clp->cl_cred.cr_group_info);
366 kfree(clp->cl_name.data); 379 kfree(clp->cl_name.data);
@@ -375,18 +388,6 @@ put_nfs4_client(struct nfs4_client *clp)
375} 388}
376 389
377static void 390static void
378shutdown_callback_client(struct nfs4_client *clp)
379{
380 struct rpc_clnt *clnt = clp->cl_callback.cb_client;
381
382 /* shutdown rpc client, ending any outstanding recall rpcs */
383 if (clnt) {
384 clp->cl_callback.cb_client = NULL;
385 rpc_shutdown_client(clnt);
386 }
387}
388
389static void
390expire_client(struct nfs4_client *clp) 391expire_client(struct nfs4_client *clp)
391{ 392{
392 struct nfs4_stateowner *sop; 393 struct nfs4_stateowner *sop;
@@ -396,8 +397,6 @@ expire_client(struct nfs4_client *clp)
396 dprintk("NFSD: expire_client cl_count %d\n", 397 dprintk("NFSD: expire_client cl_count %d\n",
397 atomic_read(&clp->cl_count)); 398 atomic_read(&clp->cl_count));
398 399
399 shutdown_callback_client(clp);
400
401 INIT_LIST_HEAD(&reaplist); 400 INIT_LIST_HEAD(&reaplist);
402 spin_lock(&recall_lock); 401 spin_lock(&recall_lock);
403 while (!list_empty(&clp->cl_delegations)) { 402 while (!list_empty(&clp->cl_delegations)) {