diff options
author | Gao feng <gaofeng@cn.fujitsu.com> | 2013-01-21 22:10:31 +0000 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-01-23 12:56:23 +0100 |
commit | 5f69b8f5218dc303cbcb6f71d221c27d3cd17ebb (patch) | |
tree | b904cb0d77fe07d3ac67bc7b9f25bbf13c5322ca /net/netfilter/nf_conntrack_labels.c | |
parent | 5e615b220087c5551f486c967831cecdfd338dbe (diff) | |
download | linux-5f69b8f5218dc303cbcb6f71d221c27d3cd17ebb.tar.bz2 |
netfilter: nf_ct_labels: move initialization out of pernet_operations
Move the global initial codes to the module_init/exit context.
Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nf_conntrack_labels.c')
-rw-r--r-- | net/netfilter/nf_conntrack_labels.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/net/netfilter/nf_conntrack_labels.c b/net/netfilter/nf_conntrack_labels.c index e1d1eb850e7f..8fe2e99428b7 100644 --- a/net/netfilter/nf_conntrack_labels.c +++ b/net/netfilter/nf_conntrack_labels.c @@ -101,15 +101,12 @@ static struct nf_ct_ext_type labels_extend __read_mostly = { .id = NF_CT_EXT_LABELS, }; -int nf_conntrack_labels_init(struct net *net) +int nf_conntrack_labels_init(void) { - if (net_eq(net, &init_net)) - return nf_ct_extend_register(&labels_extend); - return 0; + return nf_ct_extend_register(&labels_extend); } -void nf_conntrack_labels_fini(struct net *net) +void nf_conntrack_labels_fini(void) { - if (net_eq(net, &init_net)) - nf_ct_extend_unregister(&labels_extend); + nf_ct_extend_unregister(&labels_extend); } |