mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
b0e92aae15
commit
8f920d5e29
4 changed files with 7 additions and 12 deletions
|
@ -203,7 +203,8 @@ __be32 nlmsvc_lock(struct svc_rqst *, struct nlm_file *,
|
|||
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_lock *, struct nlm_lock *, struct nlm_cookie *);
|
||||
struct nlm_host *, struct nlm_lock *,
|
||||
struct nlm_lock *, struct nlm_cookie *);
|
||||
__be32 nlmsvc_cancel_blocked(struct nlm_file *, struct nlm_lock *);
|
||||
unsigned long nlmsvc_retry_blocked(void);
|
||||
void nlmsvc_traverse_blocks(struct nlm_host *, struct nlm_file *,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue