]> err.no Git - linux-2.6/commit
lockd: eliminate duplicate nlmsvc_lookup_host call from nlmsvc_lock
authorJeff Layton <jlayton@redhat.com>
Tue, 15 Jul 2008 18:26:17 +0000 (14:26 -0400)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Tue, 15 Jul 2008 18:53:33 +0000 (14:53 -0400)
commit6cde4de80773497d8333985b135f472eda870904
treef6b97fe59c31dbe750b146d785276d44223b7e4c
parent8f920d5e29f86d3425a68e1c3bc264d1f6f55112
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>
fs/lockd/svc4proc.c
fs/lockd/svclock.c
fs/lockd/svcproc.c
include/linux/lockd/lockd.h