diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-06-14 17:31:58 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-07-10 23:40:30 -0400 |
commit | f61534dfd38f895b203e2aadaba04f21a992ca8c (patch) | |
tree | 02485ae68fb2f45cbbc06152e0a4856ceff5f587 /fs | |
parent | 4ada539ed77c7a2bbcb75cafbbd7bd8d2b9bef7b (diff) |
SUNRPC: Remove redundant calls to rpciod_up()/rpciod_down()
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/lockd/svc.c | 6 | ||||
-rw-r--r-- | fs/nfs/client.c | 15 | ||||
-rw-r--r-- | fs/nfsd/nfs4callback.c | 12 | ||||
-rw-r--r-- | fs/nfsd/nfs4state.c | 1 |
4 files changed, 3 insertions, 31 deletions
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c index 126b1bf02c0e..26809325469c 100644 --- a/fs/lockd/svc.c +++ b/fs/lockd/svc.c | |||
@@ -123,9 +123,6 @@ lockd(struct svc_rqst *rqstp) | |||
123 | /* Process request with signals blocked, but allow SIGKILL. */ | 123 | /* Process request with signals blocked, but allow SIGKILL. */ |
124 | allow_signal(SIGKILL); | 124 | allow_signal(SIGKILL); |
125 | 125 | ||
126 | /* kick rpciod */ | ||
127 | rpciod_up(); | ||
128 | |||
129 | dprintk("NFS locking service started (ver " LOCKD_VERSION ").\n"); | 126 | dprintk("NFS locking service started (ver " LOCKD_VERSION ").\n"); |
130 | 127 | ||
131 | if (!nlm_timeout) | 128 | if (!nlm_timeout) |
@@ -202,9 +199,6 @@ lockd(struct svc_rqst *rqstp) | |||
202 | /* Exit the RPC thread */ | 199 | /* Exit the RPC thread */ |
203 | svc_exit_thread(rqstp); | 200 | svc_exit_thread(rqstp); |
204 | 201 | ||
205 | /* release rpciod */ | ||
206 | rpciod_down(); | ||
207 | |||
208 | /* Release module */ | 202 | /* Release module */ |
209 | unlock_kernel(); | 203 | unlock_kernel(); |
210 | module_put_and_exit(0); | 204 | module_put_and_exit(0); |
diff --git a/fs/nfs/client.c b/fs/nfs/client.c index 881fa4900923..71d4c4cdac52 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c | |||
@@ -102,19 +102,10 @@ static struct nfs_client *nfs_alloc_client(const char *hostname, | |||
102 | int nfsversion) | 102 | int nfsversion) |
103 | { | 103 | { |
104 | struct nfs_client *clp; | 104 | struct nfs_client *clp; |
105 | int error; | ||
106 | 105 | ||
107 | if ((clp = kzalloc(sizeof(*clp), GFP_KERNEL)) == NULL) | 106 | if ((clp = kzalloc(sizeof(*clp), GFP_KERNEL)) == NULL) |
108 | goto error_0; | 107 | goto error_0; |
109 | 108 | ||
110 | error = rpciod_up(); | ||
111 | if (error < 0) { | ||
112 | dprintk("%s: couldn't start rpciod! Error = %d\n", | ||
113 | __FUNCTION__, error); | ||
114 | goto error_1; | ||
115 | } | ||
116 | __set_bit(NFS_CS_RPCIOD, &clp->cl_res_state); | ||
117 | |||
118 | if (nfsversion == 4) { | 109 | if (nfsversion == 4) { |
119 | if (nfs_callback_up() < 0) | 110 | if (nfs_callback_up() < 0) |
120 | goto error_2; | 111 | goto error_2; |
@@ -154,9 +145,6 @@ error_3: | |||
154 | if (__test_and_clear_bit(NFS_CS_CALLBACK, &clp->cl_res_state)) | 145 | if (__test_and_clear_bit(NFS_CS_CALLBACK, &clp->cl_res_state)) |
155 | nfs_callback_down(); | 146 | nfs_callback_down(); |
156 | error_2: | 147 | error_2: |
157 | rpciod_down(); | ||
158 | __clear_bit(NFS_CS_RPCIOD, &clp->cl_res_state); | ||
159 | error_1: | ||
160 | kfree(clp); | 148 | kfree(clp); |
161 | error_0: | 149 | error_0: |
162 | return NULL; | 150 | return NULL; |
@@ -198,9 +186,6 @@ static void nfs_free_client(struct nfs_client *clp) | |||
198 | if (__test_and_clear_bit(NFS_CS_CALLBACK, &clp->cl_res_state)) | 186 | if (__test_and_clear_bit(NFS_CS_CALLBACK, &clp->cl_res_state)) |
199 | nfs_callback_down(); | 187 | nfs_callback_down(); |
200 | 188 | ||
201 | if (__test_and_clear_bit(NFS_CS_RPCIOD, &clp->cl_res_state)) | ||
202 | rpciod_down(); | ||
203 | |||
204 | kfree(clp->cl_hostname); | 189 | kfree(clp->cl_hostname); |
205 | kfree(clp); | 190 | kfree(clp); |
206 | 191 | ||
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index 864090edc28b..6b1b487db1ec 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c | |||
@@ -429,29 +429,23 @@ nfsd4_probe_callback(struct nfs4_client *clp) | |||
429 | goto out_err; | 429 | goto out_err; |
430 | } | 430 | } |
431 | 431 | ||
432 | /* Kick rpciod, put the call on the wire. */ | ||
433 | if (rpciod_up() != 0) | ||
434 | goto out_clnt; | ||
435 | |||
436 | /* the task holds a reference to the nfs4_client struct */ | 432 | /* the task holds a reference to the nfs4_client struct */ |
437 | atomic_inc(&clp->cl_count); | 433 | atomic_inc(&clp->cl_count); |
438 | 434 | ||
439 | msg.rpc_cred = nfsd4_lookupcred(clp,0); | 435 | msg.rpc_cred = nfsd4_lookupcred(clp,0); |
440 | if (IS_ERR(msg.rpc_cred)) | 436 | if (IS_ERR(msg.rpc_cred)) |
441 | goto out_rpciod; | 437 | goto out_release_clp; |
442 | status = rpc_call_async(cb->cb_client, &msg, RPC_TASK_ASYNC, &nfs4_cb_null_ops, NULL); | 438 | status = rpc_call_async(cb->cb_client, &msg, RPC_TASK_ASYNC, &nfs4_cb_null_ops, NULL); |
443 | put_rpccred(msg.rpc_cred); | 439 | put_rpccred(msg.rpc_cred); |
444 | 440 | ||
445 | if (status != 0) { | 441 | if (status != 0) { |
446 | dprintk("NFSD: asynchronous NFSPROC4_CB_NULL failed!\n"); | 442 | dprintk("NFSD: asynchronous NFSPROC4_CB_NULL failed!\n"); |
447 | goto out_rpciod; | 443 | goto out_release_clp; |
448 | } | 444 | } |
449 | return; | 445 | return; |
450 | 446 | ||
451 | out_rpciod: | 447 | out_release_clp: |
452 | atomic_dec(&clp->cl_count); | 448 | atomic_dec(&clp->cl_count); |
453 | rpciod_down(); | ||
454 | out_clnt: | ||
455 | rpc_shutdown_client(cb->cb_client); | 449 | rpc_shutdown_client(cb->cb_client); |
456 | out_err: | 450 | out_err: |
457 | cb->cb_client = NULL; | 451 | cb->cb_client = NULL; |
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 3cc8ce422ab1..8c52913d7cb6 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -378,7 +378,6 @@ shutdown_callback_client(struct nfs4_client *clp) | |||
378 | if (clnt) { | 378 | if (clnt) { |
379 | clp->cl_callback.cb_client = NULL; | 379 | clp->cl_callback.cb_client = NULL; |
380 | rpc_shutdown_client(clnt); | 380 | rpc_shutdown_client(clnt); |
381 | rpciod_down(); | ||
382 | } | 381 | } |
383 | } | 382 | } |
384 | 383 | ||