提交 38220345 编写于 作者: K Kirill Tkhai 提交者: David S. Miller

net: Convert log pernet_operations

These pernet_operations use nf_log_set() and nf_log_unset()
in their methods:

	nf_log_bridge_net_ops
	nf_log_arp_net_ops
	nf_log_ipv4_net_ops
	nf_log_ipv6_net_ops
	nf_log_netdev_net_ops

Nobody can send such a packet to a net before it's became
registered, nobody can send a packet after all netdevices
are unregistered. So, these pernet_operations are able
to be marked as async.
Signed-off-by: NKirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 ec012f3b
...@@ -48,6 +48,7 @@ static void __net_exit nf_log_bridge_net_exit(struct net *net) ...@@ -48,6 +48,7 @@ static void __net_exit nf_log_bridge_net_exit(struct net *net)
static struct pernet_operations nf_log_bridge_net_ops = { static struct pernet_operations nf_log_bridge_net_ops = {
.init = nf_log_bridge_net_init, .init = nf_log_bridge_net_init,
.exit = nf_log_bridge_net_exit, .exit = nf_log_bridge_net_exit,
.async = true,
}; };
static int __init nf_log_bridge_init(void) static int __init nf_log_bridge_init(void)
......
...@@ -122,6 +122,7 @@ static void __net_exit nf_log_arp_net_exit(struct net *net) ...@@ -122,6 +122,7 @@ static void __net_exit nf_log_arp_net_exit(struct net *net)
static struct pernet_operations nf_log_arp_net_ops = { static struct pernet_operations nf_log_arp_net_ops = {
.init = nf_log_arp_net_init, .init = nf_log_arp_net_init,
.exit = nf_log_arp_net_exit, .exit = nf_log_arp_net_exit,
.async = true,
}; };
static int __init nf_log_arp_init(void) static int __init nf_log_arp_init(void)
......
...@@ -358,6 +358,7 @@ static void __net_exit nf_log_ipv4_net_exit(struct net *net) ...@@ -358,6 +358,7 @@ static void __net_exit nf_log_ipv4_net_exit(struct net *net)
static struct pernet_operations nf_log_ipv4_net_ops = { static struct pernet_operations nf_log_ipv4_net_ops = {
.init = nf_log_ipv4_net_init, .init = nf_log_ipv4_net_init,
.exit = nf_log_ipv4_net_exit, .exit = nf_log_ipv4_net_exit,
.async = true,
}; };
static int __init nf_log_ipv4_init(void) static int __init nf_log_ipv4_init(void)
......
...@@ -390,6 +390,7 @@ static void __net_exit nf_log_ipv6_net_exit(struct net *net) ...@@ -390,6 +390,7 @@ static void __net_exit nf_log_ipv6_net_exit(struct net *net)
static struct pernet_operations nf_log_ipv6_net_ops = { static struct pernet_operations nf_log_ipv6_net_ops = {
.init = nf_log_ipv6_net_init, .init = nf_log_ipv6_net_init,
.exit = nf_log_ipv6_net_exit, .exit = nf_log_ipv6_net_exit,
.async = true,
}; };
static int __init nf_log_ipv6_init(void) static int __init nf_log_ipv6_init(void)
......
...@@ -47,6 +47,7 @@ static void __net_exit nf_log_netdev_net_exit(struct net *net) ...@@ -47,6 +47,7 @@ static void __net_exit nf_log_netdev_net_exit(struct net *net)
static struct pernet_operations nf_log_netdev_net_ops = { static struct pernet_operations nf_log_netdev_net_ops = {
.init = nf_log_netdev_net_init, .init = nf_log_netdev_net_init,
.exit = nf_log_netdev_net_exit, .exit = nf_log_netdev_net_exit,
.async = true,
}; };
static int __init nf_log_netdev_init(void) static int __init nf_log_netdev_init(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册