inet: frags: refactor ipfrag_init()
We need to call inet_frags_init() before register_pernet_subsys(), as a prereq for following patch ("inet: frags: use rhashtables for reassembly units") Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
807f1844df
commit
483a6e4fa0
1 changed files with 2 additions and 2 deletions
|
@ -896,8 +896,6 @@ static struct pernet_operations ip4_frags_ops = {
|
||||||
|
|
||||||
void __init ipfrag_init(void)
|
void __init ipfrag_init(void)
|
||||||
{
|
{
|
||||||
ip4_frags_ctl_register();
|
|
||||||
register_pernet_subsys(&ip4_frags_ops);
|
|
||||||
ip4_frags.hashfn = ip4_hashfn;
|
ip4_frags.hashfn = ip4_hashfn;
|
||||||
ip4_frags.constructor = ip4_frag_init;
|
ip4_frags.constructor = ip4_frag_init;
|
||||||
ip4_frags.destructor = ip4_frag_free;
|
ip4_frags.destructor = ip4_frag_free;
|
||||||
|
@ -907,4 +905,6 @@ void __init ipfrag_init(void)
|
||||||
ip4_frags.frags_cache_name = ip_frag_cache_name;
|
ip4_frags.frags_cache_name = ip_frag_cache_name;
|
||||||
if (inet_frags_init(&ip4_frags))
|
if (inet_frags_init(&ip4_frags))
|
||||||
panic("IP: failed to allocate ip4_frags cache\n");
|
panic("IP: failed to allocate ip4_frags cache\n");
|
||||||
|
ip4_frags_ctl_register();
|
||||||
|
register_pernet_subsys(&ip4_frags_ops);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue