summaryrefslogtreecommitdiffstats
path: root/fs/lockd/svcproc.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2008-07-15 20:26:17 +0200
committerJ. Bruce Fields <bfields@citi.umich.edu>2008-07-15 20:53:33 +0200
commit6cde4de80773497d8333985b135f472eda870904 (patch)
treef6b97fe59c31dbe750b146d785276d44223b7e4c /fs/lockd/svcproc.c
parentlockd: eliminate duplicate nlmsvc_lookup_host call from nlmsvc_testlock (diff)
downloadlinux-6cde4de80773497d8333985b135f472eda870904.tar.xz
linux-6cde4de80773497d8333985b135f472eda870904.zip
lockd: eliminate duplicate nlmsvc_lookup_host call from nlmsvc_lock
nlmsvc_lock calls nlmsvc_lookup_host to find a nlm_host struct. The callers of this function, however, call nlmsvc_retrieve_args or nlm4svc_retrieve_args, which also return a nlm_host struct. Change nlmsvc_lock to take a host arg instead of calling nlmsvc_lookup_host itself and change the callers to pass a pointer to the nlm_host they've already found. Since nlmsvc_testlock() now just uses the caller's reference, we no longer need to get or release it. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs/lockd/svcproc.c')
-rw-r--r--fs/lockd/svcproc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/lockd/svcproc.c b/fs/lockd/svcproc.c
index e099f589b61b..82dc9083ba67 100644
--- a/fs/lockd/svcproc.c
+++ b/fs/lockd/svcproc.c
@@ -175,7 +175,7 @@ nlmsvc_proc_lock(struct svc_rqst *rqstp, struct nlm_args *argp,
#endif
/* Now try to lock the file */
- resp->status = cast_status(nlmsvc_lock(rqstp, file, &argp->lock,
+ resp->status = cast_status(nlmsvc_lock(rqstp, file, host, &argp->lock,
argp->block, &argp->cookie));
if (resp->status == nlm_drop_reply)
rc = rpc_drop_reply;