diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2010-12-14 10:06:12 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-12-16 12:37:26 -0500 |
commit | 67216b94d498f5880d8bba2a6b841880739dd524 (patch) | |
tree | c1334c1db47782b6af9cd69e5165538d9659bca1 /fs/lockd/svc4proc.c | |
parent | 8ea6ecc8b0759756a766c05dc7c98c51ec90de37 (diff) |
lockd: Clean up nlmsvc_lookup_host()
Clean up.
Change nlmsvc_lookup_host() to be purpose-built for server-side
nlm_host management. This replaces the generic nlm_lookup_host()
helper function, just like on the client side. The lookup logic is
specialized for server host lookups.
The server side cache also gets its own specialized equivalent of the
nlm_release_host() function.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/lockd/svc4proc.c')
-rw-r--r-- | fs/lockd/svc4proc.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/lockd/svc4proc.c b/fs/lockd/svc4proc.c index c187422026d8..9a41fdc19511 100644 --- a/fs/lockd/svc4proc.c +++ b/fs/lockd/svc4proc.c | |||
@@ -51,7 +51,7 @@ nlm4svc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp, | |||
51 | return 0; | 51 | return 0; |
52 | 52 | ||
53 | no_locks: | 53 | no_locks: |
54 | nlm_release_host(host); | 54 | nlmsvc_release_host(host); |
55 | if (error) | 55 | if (error) |
56 | return error; | 56 | return error; |
57 | return nlm_lck_denied_nolocks; | 57 | return nlm_lck_denied_nolocks; |
@@ -92,7 +92,7 @@ nlm4svc_proc_test(struct svc_rqst *rqstp, struct nlm_args *argp, | |||
92 | else | 92 | else |
93 | dprintk("lockd: TEST4 status %d\n", ntohl(resp->status)); | 93 | dprintk("lockd: TEST4 status %d\n", ntohl(resp->status)); |
94 | 94 | ||
95 | nlm_release_host(host); | 95 | nlmsvc_release_host(host); |
96 | nlm_release_file(file); | 96 | nlm_release_file(file); |
97 | return rc; | 97 | return rc; |
98 | } | 98 | } |
@@ -134,7 +134,7 @@ nlm4svc_proc_lock(struct svc_rqst *rqstp, struct nlm_args *argp, | |||
134 | else | 134 | else |
135 | dprintk("lockd: LOCK status %d\n", ntohl(resp->status)); | 135 | dprintk("lockd: LOCK status %d\n", ntohl(resp->status)); |
136 | 136 | ||
137 | nlm_release_host(host); | 137 | nlmsvc_release_host(host); |
138 | nlm_release_file(file); | 138 | nlm_release_file(file); |
139 | return rc; | 139 | return rc; |
140 | } | 140 | } |
@@ -164,7 +164,7 @@ nlm4svc_proc_cancel(struct svc_rqst *rqstp, struct nlm_args *argp, | |||
164 | resp->status = nlmsvc_cancel_blocked(file, &argp->lock); | 164 | resp->status = nlmsvc_cancel_blocked(file, &argp->lock); |
165 | 165 | ||
166 | dprintk("lockd: CANCEL status %d\n", ntohl(resp->status)); | 166 | dprintk("lockd: CANCEL status %d\n", ntohl(resp->status)); |
167 | nlm_release_host(host); | 167 | nlmsvc_release_host(host); |
168 | nlm_release_file(file); | 168 | nlm_release_file(file); |
169 | return rpc_success; | 169 | return rpc_success; |
170 | } | 170 | } |
@@ -197,7 +197,7 @@ nlm4svc_proc_unlock(struct svc_rqst *rqstp, struct nlm_args *argp, | |||
197 | resp->status = nlmsvc_unlock(file, &argp->lock); | 197 | resp->status = nlmsvc_unlock(file, &argp->lock); |
198 | 198 | ||
199 | dprintk("lockd: UNLOCK status %d\n", ntohl(resp->status)); | 199 | dprintk("lockd: UNLOCK status %d\n", ntohl(resp->status)); |
200 | nlm_release_host(host); | 200 | nlmsvc_release_host(host); |
201 | nlm_release_file(file); | 201 | nlm_release_file(file); |
202 | return rpc_success; | 202 | return rpc_success; |
203 | } | 203 | } |
@@ -334,7 +334,7 @@ nlm4svc_proc_share(struct svc_rqst *rqstp, struct nlm_args *argp, | |||
334 | resp->status = nlmsvc_share_file(host, file, argp); | 334 | resp->status = nlmsvc_share_file(host, file, argp); |
335 | 335 | ||
336 | dprintk("lockd: SHARE status %d\n", ntohl(resp->status)); | 336 | dprintk("lockd: SHARE status %d\n", ntohl(resp->status)); |
337 | nlm_release_host(host); | 337 | nlmsvc_release_host(host); |
338 | nlm_release_file(file); | 338 | nlm_release_file(file); |
339 | return rpc_success; | 339 | return rpc_success; |
340 | } | 340 | } |
@@ -367,7 +367,7 @@ nlm4svc_proc_unshare(struct svc_rqst *rqstp, struct nlm_args *argp, | |||
367 | resp->status = nlmsvc_unshare_file(host, file, argp); | 367 | resp->status = nlmsvc_unshare_file(host, file, argp); |
368 | 368 | ||
369 | dprintk("lockd: UNSHARE status %d\n", ntohl(resp->status)); | 369 | dprintk("lockd: UNSHARE status %d\n", ntohl(resp->status)); |
370 | nlm_release_host(host); | 370 | nlmsvc_release_host(host); |
371 | nlm_release_file(file); | 371 | nlm_release_file(file); |
372 | return rpc_success; | 372 | return rpc_success; |
373 | } | 373 | } |
@@ -399,7 +399,7 @@ nlm4svc_proc_free_all(struct svc_rqst *rqstp, struct nlm_args *argp, | |||
399 | return rpc_success; | 399 | return rpc_success; |
400 | 400 | ||
401 | nlmsvc_free_host_resources(host); | 401 | nlmsvc_free_host_resources(host); |
402 | nlm_release_host(host); | 402 | nlmsvc_release_host(host); |
403 | return rpc_success; | 403 | return rpc_success; |
404 | } | 404 | } |
405 | 405 | ||