diff mbox series

[v2,08/31] net: Convert sysctl_pernet_ops

Message ID 151120280522.3159.7582133103648989323.stgit@localhost.localdomain
State Deferred, archived
Delegated to: David Miller
Headers show
Series Replacing net_mutex with rw_semaphore | expand

Commit Message

Kirill Tkhai Nov. 20, 2017, 6:33 p.m. UTC
This patch starts to convert pernet_subsys, registered
from core initcalls.

Methods sysctl_net_init() and sysctl_net_exit() initialize
net::sysctls table of a namespace.

pernet_operations::init()/exit() methods from the rest
of the list do not touch net::sysctls of strangers,
so it's safe to execute sysctl_pernet_ops's methods
in parallel with any other pernet_operations.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 net/sysctl_net.c |    1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/net/sysctl_net.c b/net/sysctl_net.c
index 9aed6fe1bf1a..f424539829b7 100644
--- a/net/sysctl_net.c
+++ b/net/sysctl_net.c
@@ -89,6 +89,7 @@  static void __net_exit sysctl_net_exit(struct net *net)
 static struct pernet_operations sysctl_pernet_ops = {
 	.init = sysctl_net_init,
 	.exit = sysctl_net_exit,
+	.async = true,
 };
 
 static struct ctl_table_header *net_header;