net: Convert cfg802154_pernet_ops
authorKirill Tkhai <ktkhai@virtuozzo.com>
Mon, 26 Feb 2018 13:02:37 +0000 (16:02 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 27 Feb 2018 16:01:38 +0000 (11:01 -0500)
These pernet_operations have only exit method, which
moves devices from cfg802154_rdev_list to init_net.
This may occur in any time from nl802154_wpan_phy_netns(),
so we are nice with rtnl_lock() synchronization.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Acked-by: Stefan Schmidt <stefan@osg.samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ieee802154/core.c

index cb7176cd4cd62219ec52f2b82172d9b522d5b24c..9104943c15bad7e4bceadbfd11ef1d54f089049c 100644 (file)
@@ -345,6 +345,7 @@ static void __net_exit cfg802154_pernet_exit(struct net *net)
 
 static struct pernet_operations cfg802154_pernet_ops = {
        .exit = cfg802154_pernet_exit,
+       .async = true,
 };
 
 static int __init wpan_phy_class_init(void)