Commit a5a179b6 authored by Kirill Tkhai's avatar Kirill Tkhai Committed by David S. Miller

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: default avatarKirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6c6c566e
...@@ -2094,7 +2094,8 @@ static struct pernet_operations ip_set_net_ops = { ...@@ -2094,7 +2094,8 @@ static struct pernet_operations ip_set_net_ops = {
.init = ip_set_net_init, .init = ip_set_net_init,
.exit = ip_set_net_exit, .exit = ip_set_net_exit,
.id = &ip_set_net_id, .id = &ip_set_net_id,
.size = sizeof(struct ip_set_net) .size = sizeof(struct ip_set_net),
.async = true,
}; };
static int __init static int __init
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment