Skip to content

Commit

Permalink
net: Convert pernet_subsys ops, registered via net_dev_init()
Browse files Browse the repository at this point in the history
There are:
1)dev_proc_ops and dev_mc_net_ops, which create and destroy
pernet proc file and not interesting for another net namespaces;
2)netdev_net_ops, which creates pernet hashes, which are not
touched by another pernet_operations.

So, make them async.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Acked-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Kirill Tkhai authored and David S. Miller committed Feb 13, 2018
1 parent 36b0068 commit 88b8ffe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -8833,6 +8833,7 @@ static void __net_exit netdev_exit(struct net *net)
static struct pernet_operations __net_initdata netdev_net_ops = {
.init = netdev_init,
.exit = netdev_exit,
.async = true,
};

static void __net_exit default_device_exit(struct net *net)
Expand Down
2 changes: 2 additions & 0 deletions net/core/net-procfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ static void __net_exit dev_proc_net_exit(struct net *net)
static struct pernet_operations __net_initdata dev_proc_ops = {
.init = dev_proc_net_init,
.exit = dev_proc_net_exit,
.async = true,
};

static int dev_mc_seq_show(struct seq_file *seq, void *v)
Expand Down Expand Up @@ -405,6 +406,7 @@ static void __net_exit dev_mc_net_exit(struct net *net)
static struct pernet_operations __net_initdata dev_mc_net_ops = {
.init = dev_mc_net_init,
.exit = dev_mc_net_exit,
.async = true,
};

int __init dev_proc_init(void)
Expand Down

0 comments on commit 88b8ffe

Please sign in to comment.