diff options
author | NeilBrown <neilb@suse.de> | 2006-04-11 01:55:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-11 09:18:53 -0400 |
commit | 4e2fd495b520b51e4ba83340f13520b7f07e3743 (patch) | |
tree | 91bc6f41267df3e19a71016546484edb7e648527 /fs/nfsd/nfs4state.c | |
parent | 541e0e09814594e907e18fb8d9fc9b746aa4b18a (diff) |
[PATCH] knfsd: nfsd4: add missing rpciod_down()
We should be shutting down rpciod for the callback channel when we shut down
the server.
Also note that we do rpciod_up() and create the callback client *before*
setting cb_set--the cb_set only determines whether the initial null was
succesful. So cb_set is not a reliable determiner of whether we need to clean
up, only cb_client is.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-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); |