aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd
diff options
context:
space:
mode:
Diffstat (limited to 'fs/lockd')
-rw-r--r--fs/lockd/host.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/fs/lockd/host.c b/fs/lockd/host.c
index f9b22e58f78f..0e17090c310f 100644
--- a/fs/lockd/host.c
+++ b/fs/lockd/host.c
@@ -177,9 +177,6 @@ static void nlm_destroy_host_locked(struct nlm_host *host)
177 177
178 dprintk("lockd: destroy host %s\n", host->h_name); 178 dprintk("lockd: destroy host %s\n", host->h_name);
179 179
180 BUG_ON(!list_empty(&host->h_lockowners));
181 BUG_ON(atomic_read(&host->h_count));
182
183 hlist_del_init(&host->h_hash); 180 hlist_del_init(&host->h_hash);
184 181
185 nsm_unmonitor(host); 182 nsm_unmonitor(host);
@@ -289,13 +286,12 @@ void nlmclnt_release_host(struct nlm_host *host)
289 286
290 dprintk("lockd: release client host %s\n", host->h_name); 287 dprintk("lockd: release client host %s\n", host->h_name);
291 288
292 BUG_ON(atomic_read(&host->h_count) < 0); 289 WARN_ON_ONCE(host->h_server);
293 BUG_ON(host->h_server);
294 290
295 if (atomic_dec_and_test(&host->h_count)) { 291 if (atomic_dec_and_test(&host->h_count)) {
296 BUG_ON(!list_empty(&host->h_lockowners)); 292 WARN_ON_ONCE(!list_empty(&host->h_lockowners));
297 BUG_ON(!list_empty(&host->h_granted)); 293 WARN_ON_ONCE(!list_empty(&host->h_granted));
298 BUG_ON(!list_empty(&host->h_reclaim)); 294 WARN_ON_ONCE(!list_empty(&host->h_reclaim));
299 295
300 mutex_lock(&nlm_host_mutex); 296 mutex_lock(&nlm_host_mutex);
301 nlm_destroy_host_locked(host); 297 nlm_destroy_host_locked(host);
@@ -412,8 +408,7 @@ void nlmsvc_release_host(struct nlm_host *host)
412 408
413 dprintk("lockd: release server host %s\n", host->h_name); 409 dprintk("lockd: release server host %s\n", host->h_name);
414 410
415 BUG_ON(atomic_read(&host->h_count) < 0); 411 WARN_ON_ONCE(!host->h_server);
416 BUG_ON(!host->h_server);
417 atomic_dec(&host->h_count); 412 atomic_dec(&host->h_count);
418} 413}
419 414