From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kirill Tkhai Subject: [PATCH RFC 13/25] net: Move net_inuse_ops to pernet_sys list Date: Fri, 17 Nov 2017 21:29:23 +0300 Message-ID: <151094336333.20009.16031760823513598713.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-db5eur01on0111.outbound.protection.outlook.com ([104.47.2.111]:44384 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1161311AbdKQS3a (ORCPT ); Fri, 17 Nov 2017 13:29:30 -0500 In-Reply-To: <151094119999.20009.6955267140148739392.stgit@localhost.localdomain> Sender: netdev-owner@vger.kernel.org List-ID: net/core/sock.o is the first linked file in net/core/Makefile, so its core initcall executes the first in the directory. net_inuse_ops methods expose statistics in /proc. No one from the rest of pernet_subsys or pernet_device lists does not touch net::core::inuse. So, it's safe to move net_inuse_ops to pernet_sys list. Signed-off-by: Kirill Tkhai --- net/core/sock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/sock.c b/net/core/sock.c index 13719af7b4e3..be050b044699 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -3081,7 +3081,7 @@ static struct pernet_operations net_inuse_ops = { static __init int net_inuse_init(void) { - if (register_pernet_subsys(&net_inuse_ops)) + if (register_pernet_sys(&net_inuse_ops)) panic("Cannot initialize net inuse counters"); return 0;