diff options
author | Jeff Layton <jlayton@redhat.com> | 2008-07-15 14:06:48 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2008-07-15 14:26:52 -0400 |
commit | 8f920d5e29f86d3425a68e1c3bc264d1f6f55112 (patch) | |
tree | db3054c6d5f0a2a6b239b204171e119c69ab0217 /fs/lockd/svc4proc.c | |
parent | b0e92aae157cbf78ede7b7dd03967b49fcb2102e (diff) | |
download | kernel_samsung_aries-8f920d5e29f86d3425a68e1c3bc264d1f6f55112.zip kernel_samsung_aries-8f920d5e29f86d3425a68e1c3bc264d1f6f55112.tar.gz kernel_samsung_aries-8f920d5e29f86d3425a68e1c3bc264d1f6f55112.tar.bz2 |
lockd: eliminate duplicate nlmsvc_lookup_host call from nlmsvc_testlock
nlmsvc_testlock calls nlmsvc_lookup_host to find a nlm_host struct. The
callers of this functions, however, call nlmsvc_retrieve_args or
nlm4svc_retrieve_args, which also return a nlm_host struct.
Change nlmsvc_testlock 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.
We take a reference to host in the place where nlmsvc_testlock()
previous did a new lookup, so the reference counting is unchanged from
before.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs/lockd/svc4proc.c')
-rw-r--r-- | fs/lockd/svc4proc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/lockd/svc4proc.c b/fs/lockd/svc4proc.c index 006a832..8cfb9da 100644 --- a/fs/lockd/svc4proc.c +++ b/fs/lockd/svc4proc.c @@ -99,7 +99,7 @@ nlm4svc_proc_test(struct svc_rqst *rqstp, struct nlm_args *argp, return resp->status == nlm_drop_reply ? rpc_drop_reply :rpc_success; /* Now check for conflicting locks */ - resp->status = nlmsvc_testlock(rqstp, file, &argp->lock, &resp->lock, &resp->cookie); + resp->status = nlmsvc_testlock(rqstp, file, host, &argp->lock, &resp->lock, &resp->cookie); if (resp->status == nlm_drop_reply) rc = rpc_drop_reply; else |