aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd/host.c
diff options
context:
space:
mode:
authorStanislav Kinsbursky <skinsbursky@parallels.com>2012-07-25 08:55:54 -0400
committerJ. Bruce Fields <bfields@redhat.com>2012-07-27 16:48:43 -0400
commitb26411f85d3763ec5fc553854d9c3c0966072090 (patch)
tree7d8437dee426b9d0000a9e5b2553e0e3fade822f /fs/lockd/host.c
parent99dbb8fe0992ecefd061e5efa7604b92eab58ccc (diff)
LockD: mark host per network namespace on garbage collect
This is required for per-network NLM shutdown and cleanup. This patch passes init_net for a while. Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/lockd/host.c')
-rw-r--r--fs/lockd/host.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/lockd/host.c b/fs/lockd/host.c
index eb75ca7c2d6e..2c5f41b098e9 100644
--- a/fs/lockd/host.c
+++ b/fs/lockd/host.c
@@ -628,13 +628,14 @@ nlm_gc_hosts(void)
628 struct hlist_head *chain; 628 struct hlist_head *chain;
629 struct hlist_node *pos, *next; 629 struct hlist_node *pos, *next;
630 struct nlm_host *host; 630 struct nlm_host *host;
631 struct net *net = &init_net;
631 632
632 dprintk("lockd: host garbage collection\n"); 633 dprintk("lockd: host garbage collection\n");
633 for_each_host(host, pos, chain, nlm_server_hosts) 634 for_each_host(host, pos, chain, nlm_server_hosts)
634 host->h_inuse = 0; 635 host->h_inuse = 0;
635 636
636 /* Mark all hosts that hold locks, blocks or shares */ 637 /* Mark all hosts that hold locks, blocks or shares */
637 nlmsvc_mark_resources(); 638 nlmsvc_mark_resources(net);
638 639
639 for_each_host_safe(host, pos, next, chain, nlm_server_hosts) { 640 for_each_host_safe(host, pos, next, chain, nlm_server_hosts) {
640 if (atomic_read(&host->h_count) || host->h_inuse 641 if (atomic_read(&host->h_count) || host->h_inuse