aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd/svc4proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/lockd/svc4proc.c')
-rw-r--r--fs/lockd/svc4proc.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/fs/lockd/svc4proc.c b/fs/lockd/svc4proc.c
index 031c6569a134..9a41fdc19511 100644
--- a/fs/lockd/svc4proc.c
+++ b/fs/lockd/svc4proc.c
@@ -9,7 +9,6 @@
9 9
10#include <linux/types.h> 10#include <linux/types.h>
11#include <linux/time.h> 11#include <linux/time.h>
12#include <linux/smp_lock.h>
13#include <linux/lockd/lockd.h> 12#include <linux/lockd/lockd.h>
14#include <linux/lockd/share.h> 13#include <linux/lockd/share.h>
15 14
@@ -52,7 +51,7 @@ nlm4svc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp,
52 return 0; 51 return 0;
53 52
54no_locks: 53no_locks:
55 nlm_release_host(host); 54 nlmsvc_release_host(host);
56 if (error) 55 if (error)
57 return error; 56 return error;
58 return nlm_lck_denied_nolocks; 57 return nlm_lck_denied_nolocks;
@@ -93,7 +92,7 @@ nlm4svc_proc_test(struct svc_rqst *rqstp, struct nlm_args *argp,
93 else 92 else
94 dprintk("lockd: TEST4 status %d\n", ntohl(resp->status)); 93 dprintk("lockd: TEST4 status %d\n", ntohl(resp->status));
95 94
96 nlm_release_host(host); 95 nlmsvc_release_host(host);
97 nlm_release_file(file); 96 nlm_release_file(file);
98 return rc; 97 return rc;
99} 98}
@@ -135,7 +134,7 @@ nlm4svc_proc_lock(struct svc_rqst *rqstp, struct nlm_args *argp,
135 else 134 else
136 dprintk("lockd: LOCK status %d\n", ntohl(resp->status)); 135 dprintk("lockd: LOCK status %d\n", ntohl(resp->status));
137 136
138 nlm_release_host(host); 137 nlmsvc_release_host(host);
139 nlm_release_file(file); 138 nlm_release_file(file);
140 return rc; 139 return rc;
141} 140}
@@ -165,7 +164,7 @@ nlm4svc_proc_cancel(struct svc_rqst *rqstp, struct nlm_args *argp,
165 resp->status = nlmsvc_cancel_blocked(file, &argp->lock); 164 resp->status = nlmsvc_cancel_blocked(file, &argp->lock);
166 165
167 dprintk("lockd: CANCEL status %d\n", ntohl(resp->status)); 166 dprintk("lockd: CANCEL status %d\n", ntohl(resp->status));
168 nlm_release_host(host); 167 nlmsvc_release_host(host);
169 nlm_release_file(file); 168 nlm_release_file(file);
170 return rpc_success; 169 return rpc_success;
171} 170}
@@ -198,7 +197,7 @@ nlm4svc_proc_unlock(struct svc_rqst *rqstp, struct nlm_args *argp,
198 resp->status = nlmsvc_unlock(file, &argp->lock); 197 resp->status = nlmsvc_unlock(file, &argp->lock);
199 198
200 dprintk("lockd: UNLOCK status %d\n", ntohl(resp->status)); 199 dprintk("lockd: UNLOCK status %d\n", ntohl(resp->status));
201 nlm_release_host(host); 200 nlmsvc_release_host(host);
202 nlm_release_file(file); 201 nlm_release_file(file);
203 return rpc_success; 202 return rpc_success;
204} 203}
@@ -230,9 +229,7 @@ static void nlm4svc_callback_exit(struct rpc_task *task, void *data)
230 229
231static void nlm4svc_callback_release(void *data) 230static void nlm4svc_callback_release(void *data)
232{ 231{
233 lock_kernel(); 232 nlmsvc_release_call(data);
234 nlm_release_call(data);
235 unlock_kernel();
236} 233}
237 234
238static const struct rpc_call_ops nlm4svc_callback_ops = { 235static const struct rpc_call_ops nlm4svc_callback_ops = {
@@ -264,7 +261,7 @@ static __be32 nlm4svc_callback(struct svc_rqst *rqstp, u32 proc, struct nlm_args
264 261
265 stat = func(rqstp, argp, &call->a_res); 262 stat = func(rqstp, argp, &call->a_res);
266 if (stat != 0) { 263 if (stat != 0) {
267 nlm_release_call(call); 264 nlmsvc_release_call(call);
268 return stat; 265 return stat;
269 } 266 }
270 267
@@ -337,7 +334,7 @@ nlm4svc_proc_share(struct svc_rqst *rqstp, struct nlm_args *argp,
337 resp->status = nlmsvc_share_file(host, file, argp); 334 resp->status = nlmsvc_share_file(host, file, argp);
338 335
339 dprintk("lockd: SHARE status %d\n", ntohl(resp->status)); 336 dprintk("lockd: SHARE status %d\n", ntohl(resp->status));
340 nlm_release_host(host); 337 nlmsvc_release_host(host);
341 nlm_release_file(file); 338 nlm_release_file(file);
342 return rpc_success; 339 return rpc_success;
343} 340}
@@ -370,7 +367,7 @@ nlm4svc_proc_unshare(struct svc_rqst *rqstp, struct nlm_args *argp,
370 resp->status = nlmsvc_unshare_file(host, file, argp); 367 resp->status = nlmsvc_unshare_file(host, file, argp);
371 368
372 dprintk("lockd: UNSHARE status %d\n", ntohl(resp->status)); 369 dprintk("lockd: UNSHARE status %d\n", ntohl(resp->status));
373 nlm_release_host(host); 370 nlmsvc_release_host(host);
374 nlm_release_file(file); 371 nlm_release_file(file);
375 return rpc_success; 372 return rpc_success;
376} 373}
@@ -402,7 +399,7 @@ nlm4svc_proc_free_all(struct svc_rqst *rqstp, struct nlm_args *argp,
402 return rpc_success; 399 return rpc_success;
403 400
404 nlmsvc_free_host_resources(host); 401 nlmsvc_free_host_resources(host);
405 nlm_release_host(host); 402 nlmsvc_release_host(host);
406 return rpc_success; 403 return rpc_success;
407} 404}
408 405