diff options
| -rw-r--r-- | fs/lockd/host.c | 8 | ||||
| -rw-r--r-- | fs/lockd/mon.c | 5 | ||||
| -rw-r--r-- | include/linux/lockd/lockd.h | 1 |
3 files changed, 3 insertions, 11 deletions
diff --git a/fs/lockd/host.c b/fs/lockd/host.c index 780918acd6f4..1d523c1a7b62 100644 --- a/fs/lockd/host.c +++ b/fs/lockd/host.c | |||
| @@ -37,6 +37,7 @@ static struct nsm_handle *nsm_find(const struct sockaddr *sap, | |||
| 37 | const char *hostname, | 37 | const char *hostname, |
| 38 | const size_t hostname_len, | 38 | const size_t hostname_len, |
| 39 | const int create); | 39 | const int create); |
| 40 | static void nsm_release(struct nsm_handle *nsm); | ||
| 40 | 41 | ||
| 41 | struct nlm_lookup_host_info { | 42 | struct nlm_lookup_host_info { |
| 42 | const int server; /* search for server|client */ | 43 | const int server; /* search for server|client */ |
| @@ -263,10 +264,8 @@ nlm_destroy_host(struct nlm_host *host) | |||
| 263 | BUG_ON(!list_empty(&host->h_lockowners)); | 264 | BUG_ON(!list_empty(&host->h_lockowners)); |
| 264 | BUG_ON(atomic_read(&host->h_count)); | 265 | BUG_ON(atomic_read(&host->h_count)); |
| 265 | 266 | ||
| 266 | /* | ||
| 267 | * Release NSM handle and unmonitor host. | ||
| 268 | */ | ||
| 269 | nsm_unmonitor(host); | 267 | nsm_unmonitor(host); |
| 268 | nsm_release(host->h_nsmhandle); | ||
| 270 | 269 | ||
| 271 | clnt = host->h_rpcclnt; | 270 | clnt = host->h_rpcclnt; |
| 272 | if (clnt != NULL) | 271 | if (clnt != NULL) |
| @@ -711,8 +710,7 @@ found: | |||
| 711 | /* | 710 | /* |
| 712 | * Release an NSM handle | 711 | * Release an NSM handle |
| 713 | */ | 712 | */ |
| 714 | void | 713 | static void nsm_release(struct nsm_handle *nsm) |
| 715 | nsm_release(struct nsm_handle *nsm) | ||
| 716 | { | 714 | { |
| 717 | if (!nsm) | 715 | if (!nsm) |
| 718 | return; | 716 | return; |
diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c index aaaa08e7ae7a..15fab22db028 100644 --- a/fs/lockd/mon.c +++ b/fs/lockd/mon.c | |||
| @@ -117,10 +117,6 @@ nsm_unmonitor(struct nlm_host *host) | |||
| 117 | struct nsm_res res; | 117 | struct nsm_res res; |
| 118 | int status = 0; | 118 | int status = 0; |
| 119 | 119 | ||
| 120 | if (nsm == NULL) | ||
| 121 | return 0; | ||
| 122 | host->h_nsmhandle = NULL; | ||
| 123 | |||
| 124 | if (atomic_read(&nsm->sm_count) == 1 | 120 | if (atomic_read(&nsm->sm_count) == 1 |
| 125 | && nsm->sm_monitored && !nsm->sm_sticky) { | 121 | && nsm->sm_monitored && !nsm->sm_sticky) { |
| 126 | dprintk("lockd: nsm_unmonitor(%s)\n", nsm->sm_name); | 122 | dprintk("lockd: nsm_unmonitor(%s)\n", nsm->sm_name); |
| @@ -132,7 +128,6 @@ nsm_unmonitor(struct nlm_host *host) | |||
| 132 | else | 128 | else |
| 133 | nsm->sm_monitored = 0; | 129 | nsm->sm_monitored = 0; |
| 134 | } | 130 | } |
| 135 | nsm_release(nsm); | ||
| 136 | return status; | 131 | return status; |
| 137 | } | 132 | } |
| 138 | 133 | ||
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 *); | |||
| 240 | void nlm_shutdown_hosts(void); | 240 | void nlm_shutdown_hosts(void); |
| 241 | extern void nlm_host_rebooted(const struct sockaddr_in *, const char *, | 241 | extern void nlm_host_rebooted(const struct sockaddr_in *, const char *, |
| 242 | unsigned int, u32); | 242 | unsigned int, u32); |
| 243 | void nsm_release(struct nsm_handle *); | ||
| 244 | 243 | ||
| 245 | /* | 244 | /* |
| 246 | * Host monitoring | 245 | * Host monitoring |
