diff options
author | Jeff Layton <jlayton@redhat.com> | 2008-07-15 14:26:17 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2008-07-15 14:53:33 -0400 |
commit | 6cde4de80773497d8333985b135f472eda870904 (patch) | |
tree | f6b97fe59c31dbe750b146d785276d44223b7e4c /include/linux/lockd | |
parent | 8f920d5e29f86d3425a68e1c3bc264d1f6f55112 (diff) | |
download | kernel_samsung_smdk4412-6cde4de80773497d8333985b135f472eda870904.zip kernel_samsung_smdk4412-6cde4de80773497d8333985b135f472eda870904.tar.gz kernel_samsung_smdk4412-6cde4de80773497d8333985b135f472eda870904.tar.bz2 |
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 'include/linux/lockd')
-rw-r--r-- | include/linux/lockd/lockd.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index b279670..f81f9dd 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h @@ -200,7 +200,8 @@ typedef int (*nlm_host_match_fn_t)(void *cur, struct nlm_host *ref); * Server-side lock handling */ __be32 nlmsvc_lock(struct svc_rqst *, struct nlm_file *, - struct nlm_lock *, int, struct nlm_cookie *); + struct nlm_host *, struct nlm_lock *, int, + struct nlm_cookie *); __be32 nlmsvc_unlock(struct nlm_file *, struct nlm_lock *); __be32 nlmsvc_testlock(struct svc_rqst *, struct nlm_file *, struct nlm_host *, struct nlm_lock *, |