aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd/host.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/lockd/host.c')
-rw-r--r--fs/lockd/host.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/lockd/host.c b/fs/lockd/host.c
index f456f8ed9acd..112ebf8b8dfe 100644
--- a/fs/lockd/host.c
+++ b/fs/lockd/host.c
@@ -245,8 +245,12 @@ void nlm_release_host(struct nlm_host *host)
245{ 245{
246 if (host != NULL) { 246 if (host != NULL) {
247 dprintk("lockd: release host %s\n", host->h_name); 247 dprintk("lockd: release host %s\n", host->h_name);
248 atomic_dec(&host->h_count);
249 BUG_ON(atomic_read(&host->h_count) < 0); 248 BUG_ON(atomic_read(&host->h_count) < 0);
249 if (atomic_dec_and_test(&host->h_count)) {
250 BUG_ON(!list_empty(&host->h_lockowners));
251 BUG_ON(!list_empty(&host->h_granted));
252 BUG_ON(!list_empty(&host->h_reclaim));
253 }
250 } 254 }
251} 255}
252 256
@@ -334,7 +338,6 @@ nlm_gc_hosts(void)
334 rpc_destroy_client(host->h_rpcclnt); 338 rpc_destroy_client(host->h_rpcclnt);
335 } 339 }
336 } 340 }
337 BUG_ON(!list_empty(&host->h_lockowners));
338 kfree(host); 341 kfree(host);
339 nrhosts--; 342 nrhosts--;
340 } 343 }