From a192069c576cd7d4b7174f26af27950b0a95d269 Mon Sep 17 00:00:00 2001 From: Kirill Tkhai Date: Mon, 22 Oct 2018 20:46:53 +0200 Subject: net: Convert ip_set_net_ops These pernet_operations initialize and destroy net_generic(net, ip_set_net_id)-related data. Since ip_set is under CONFIG_IP_SET, it's easy to watch drivers, which depend on this config. All of them are in net/netfilter/ipset directory, except of net/netfilter/xt_set.c. There are no more drivers, which use ip_set, and all of the above don't register another pernet_operations. Also, there are is no indirect users, as header file include/linux/netfilter/ipset/ip_set.h does not define indirect users by something like this: #ifdef CONFIG_IP_SET extern func(void); #else static inline func(void); #endif So, there are no more pernet operations, dereferencing net_generic(net, ip_set_net_id). ip_set_net_ops are OK to be executed in parallel for several net, so we mark them as async. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller Signed-off-by: Jozsef Kadlecsik --- kernel/net/netfilter/ipset/ip_set_core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kernel/net/netfilter/ipset/ip_set_core.c b/kernel/net/netfilter/ipset/ip_set_core.c index 9dccdf3..65628ae 100644 --- a/kernel/net/netfilter/ipset/ip_set_core.c +++ b/kernel/net/netfilter/ipset/ip_set_core.c @@ -2159,7 +2159,10 @@ static struct pernet_operations ip_set_net_ops = { .exit = ip_set_net_exit, #ifdef HAVE_NET_OPS_ID .id = &ip_set_net_id, - .size = sizeof(struct ip_set_net) + .size = sizeof(struct ip_set_net), +#ifdef HAVE_NET_OPS_ASYNC + .async = true, +#endif #endif }; -- cgit v1.2.3