diff options
-rw-r--r-- | fs/nfsd/nfs4state.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 01ff544dc1f5..e97c58aafde5 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -330,22 +330,29 @@ put_nfs4_client(struct nfs4_client *clp) | |||
330 | } | 330 | } |
331 | 331 | ||
332 | static void | 332 | static void |
333 | shutdown_callback_client(struct nfs4_client *clp) | ||
334 | { | ||
335 | struct rpc_clnt *clnt = clp->cl_callback.cb_client; | ||
336 | |||
337 | /* shutdown rpc client, ending any outstanding recall rpcs */ | ||
338 | if (clnt) { | ||
339 | clp->cl_callback.cb_client = NULL; | ||
340 | rpc_shutdown_client(clnt); | ||
341 | rpciod_down(); | ||
342 | } | ||
343 | } | ||
344 | |||
345 | static void | ||
333 | expire_client(struct nfs4_client *clp) | 346 | expire_client(struct nfs4_client *clp) |
334 | { | 347 | { |
335 | struct nfs4_stateowner *sop; | 348 | struct nfs4_stateowner *sop; |
336 | struct nfs4_delegation *dp; | 349 | struct nfs4_delegation *dp; |
337 | struct nfs4_callback *cb = &clp->cl_callback; | ||
338 | struct rpc_clnt *clnt = clp->cl_callback.cb_client; | ||
339 | struct list_head reaplist; | 350 | struct list_head reaplist; |
340 | 351 | ||
341 | dprintk("NFSD: expire_client cl_count %d\n", | 352 | dprintk("NFSD: expire_client cl_count %d\n", |
342 | atomic_read(&clp->cl_count)); | 353 | atomic_read(&clp->cl_count)); |
343 | 354 | ||
344 | /* shutdown rpc client, ending any outstanding recall rpcs */ | 355 | shutdown_callback_client(clp); |
345 | if (atomic_read(&cb->cb_set) == 1 && clnt) { | ||
346 | rpc_shutdown_client(clnt); | ||
347 | clnt = clp->cl_callback.cb_client = NULL; | ||
348 | } | ||
349 | 356 | ||
350 | INIT_LIST_HEAD(&reaplist); | 357 | INIT_LIST_HEAD(&reaplist); |
351 | spin_lock(&recall_lock); | 358 | spin_lock(&recall_lock); |