From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kirill Tkhai Subject: [PATCH RFC 20/25] net: Move pernet_subsys, registered via net_dev_init(), to pernet_sys list Date: Fri, 17 Nov 2017 21:30:26 +0300 Message-ID: <151094342656.20009.6025363389753363059.stgit@localhost.localdomain> References: <151094119999.20009.6955267140148739392.stgit@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: davem@davemloft.net, vyasevic@redhat.com, kstewart@linuxfoundation.org, pombredanne@nexb.com, vyasevich@gmail.com, mark.rutland@arm.com, gregkh@linuxfoundation.org, adobriyan@gmail.com, fw@strlen.de, nicolas.dichtel@6wind.com, xiyou.wangcong@gmail.com, roman.kapl@sysgo.com, paul@paul-moore.com, dsahern@gmail.com, daniel@iogearbox.net, lucien.xin@gmail.com, mschiffer@universe-factory.net, rshearma@brocade.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, ktkhai@virtuozzo.com, ebiederm@xmission.com, avagin@virtuozzo.com, gorcunov@virtuozzo.com, eric.dumazet@gmail.com, stephen@networkplumber.org, ktkhai@virtuozzo.com Return-path: Received: from mail-eopbgr00091.outbound.protection.outlook.com ([40.107.0.91]:52544 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1760863AbdKQSag (ORCPT ); Fri, 17 Nov 2017 13:30:36 -0500 In-Reply-To: <151094119999.20009.6955267140148739392.stgit@localhost.localdomain> Sender: netdev-owner@vger.kernel.org List-ID: net/core/dev.o is lined after net/core/sock.o. There are: 1)dev_proc_ops and dev_mc_net_ops, which create and destroy pernet proc file and not interested to another net namespaces; 2)netdev_net_ops, which creates pernet hash, which is not touched by another pernet_operations. So, move it to pernet_sys list. Signed-off-by: Kirill Tkhai --- net/core/dev.c | 2 +- net/core/net-procfs.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/net/core/dev.c b/net/core/dev.c index 8ee29f4f5fa9..b90a503a9e1a 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -8787,7 +8787,7 @@ static int __init net_dev_init(void) INIT_LIST_HEAD(&offload_base); - if (register_pernet_subsys(&netdev_net_ops)) + if (register_pernet_sys(&netdev_net_ops)) goto out; /* diff --git a/net/core/net-procfs.c b/net/core/net-procfs.c index 615ccab55f38..46096219d574 100644 --- a/net/core/net-procfs.c +++ b/net/core/net-procfs.c @@ -413,8 +413,8 @@ static struct pernet_operations __net_initdata dev_mc_net_ops = { int __init dev_proc_init(void) { - int ret = register_pernet_subsys(&dev_proc_ops); + int ret = register_pernet_sys(&dev_proc_ops); if (!ret) - return register_pernet_subsys(&dev_mc_net_ops); + return register_pernet_sys(&dev_mc_net_ops); return ret; }