summaryrefslogtreecommitdiff
path: root/include/linux/lockd/lockd.h
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2008-12-04 22:21:31 +0300
committerJ. Bruce Fields <bfields@citi.umich.edu>2009-01-06 19:53:52 +0300
commitc8c23c423dec49cb439697d3dc714e1500ff1610 (patch)
tree161035f51e31cce6d9f8dc104bad62a329496a77 /include/linux/lockd/lockd.h
parent1e49323c4ab044d05bbc68cf13cadcbd4372468c (diff)
downloadlinux-c8c23c423dec49cb439697d3dc714e1500ff1610.tar.xz
NSM: Release nsmhandle in nlm_destroy_host
The nsm_handle's reference count is bumped in nlm_lookup_host(). It should be decremented in nlm_destroy_host() to make it easier to see the balance of these two operations. Move the nsm_release() call to fs/lockd/host.c. The h_nsmhandle pointer is set in nlm_lookup_host(), and never cleared. The nlm_destroy_host() function is never called for the same nlm_host twice, so h_nsmhandle won't ever be NULL when nsm_unmonitor() is called. All references to the nlm_host are gone before it is freed. We can skip making h_nsmhandle NULL just before the nlm_host is deallocated. It's also likely we can remove the h_nsmhandle NULL check in nlmsvc_is_client() as well, but we can do that later when rearchitect- ing the nlm_host cache. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'include/linux/lockd/lockd.h')
-rw-r--r--include/linux/lockd/lockd.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h
index f15a4f5ccbfb..30a6a9c1ce42 100644
--- a/include/linux/lockd/lockd.h
+++ b/include/linux/lockd/lockd.h
@@ -240,7 +240,6 @@ void nlm_release_host(struct nlm_host *);
void nlm_shutdown_hosts(void);
extern void nlm_host_rebooted(const struct sockaddr_in *, const char *,
unsigned int, u32);
-void nsm_release(struct nsm_handle *);
/*
* Host monitoring