diff options
Diffstat (limited to 'fs/lockd/host.c')
-rw-r--r-- | fs/lockd/host.c | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/fs/lockd/host.c b/fs/lockd/host.c index 9ebd91dc42c3..eb75ca7c2d6e 100644 --- a/fs/lockd/host.c +++ b/fs/lockd/host.c | |||
@@ -565,12 +565,8 @@ void nlm_host_rebooted(const struct nlm_reboot *info) | |||
565 | nsm_release(nsm); | 565 | nsm_release(nsm); |
566 | } | 566 | } |
567 | 567 | ||
568 | /* | ||
569 | * Shut down the hosts module. | ||
570 | * Note that this routine is called only at server shutdown time. | ||
571 | */ | ||
572 | void | 568 | void |
573 | nlm_shutdown_hosts(void) | 569 | nlm_shutdown_hosts_net(struct net *net) |
574 | { | 570 | { |
575 | struct hlist_head *chain; | 571 | struct hlist_head *chain; |
576 | struct hlist_node *pos; | 572 | struct hlist_node *pos; |
@@ -582,6 +578,8 @@ nlm_shutdown_hosts(void) | |||
582 | /* First, make all hosts eligible for gc */ | 578 | /* First, make all hosts eligible for gc */ |
583 | dprintk("lockd: nuking all hosts...\n"); | 579 | dprintk("lockd: nuking all hosts...\n"); |
584 | for_each_host(host, pos, chain, nlm_server_hosts) { | 580 | for_each_host(host, pos, chain, nlm_server_hosts) { |
581 | if (net && host->net != net) | ||
582 | continue; | ||
585 | host->h_expires = jiffies - 1; | 583 | host->h_expires = jiffies - 1; |
586 | if (host->h_rpcclnt) { | 584 | if (host->h_rpcclnt) { |
587 | rpc_shutdown_client(host->h_rpcclnt); | 585 | rpc_shutdown_client(host->h_rpcclnt); |
@@ -592,15 +590,29 @@ nlm_shutdown_hosts(void) | |||
592 | /* Then, perform a garbage collection pass */ | 590 | /* Then, perform a garbage collection pass */ |
593 | nlm_gc_hosts(); | 591 | nlm_gc_hosts(); |
594 | mutex_unlock(&nlm_host_mutex); | 592 | mutex_unlock(&nlm_host_mutex); |
593 | } | ||
594 | |||
595 | /* | ||
596 | * Shut down the hosts module. | ||
597 | * Note that this routine is called only at server shutdown time. | ||
598 | */ | ||
599 | void | ||
600 | nlm_shutdown_hosts(void) | ||
601 | { | ||
602 | struct hlist_head *chain; | ||
603 | struct hlist_node *pos; | ||
604 | struct nlm_host *host; | ||
605 | |||
606 | nlm_shutdown_hosts_net(NULL); | ||
595 | 607 | ||
596 | /* complain if any hosts are left */ | 608 | /* complain if any hosts are left */ |
597 | if (nrhosts != 0) { | 609 | if (nrhosts != 0) { |
598 | printk(KERN_WARNING "lockd: couldn't shutdown host module!\n"); | 610 | printk(KERN_WARNING "lockd: couldn't shutdown host module!\n"); |
599 | dprintk("lockd: %lu hosts left:\n", nrhosts); | 611 | dprintk("lockd: %lu hosts left:\n", nrhosts); |
600 | for_each_host(host, pos, chain, nlm_server_hosts) { | 612 | for_each_host(host, pos, chain, nlm_server_hosts) { |
601 | dprintk(" %s (cnt %d use %d exp %ld)\n", | 613 | dprintk(" %s (cnt %d use %d exp %ld net %p)\n", |
602 | host->h_name, atomic_read(&host->h_count), | 614 | host->h_name, atomic_read(&host->h_count), |
603 | host->h_inuse, host->h_expires); | 615 | host->h_inuse, host->h_expires, host->net); |
604 | } | 616 | } |
605 | } | 617 | } |
606 | } | 618 | } |