Skip to content

Commit 483a6e4

Browse files
edumazetdavem330
authored andcommitted
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>
1 parent 807f184 commit 483a6e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/ipv4/ip_fragment.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -896,8 +896,6 @@ static struct pernet_operations ip4_frags_ops = {
896896

897897
void __init ipfrag_init(void)
898898
{
899-
ip4_frags_ctl_register();
900-
register_pernet_subsys(&ip4_frags_ops);
901899
ip4_frags.hashfn = ip4_hashfn;
902900
ip4_frags.constructor = ip4_frag_init;
903901
ip4_frags.destructor = ip4_frag_free;
@@ -907,4 +905,6 @@ void __init ipfrag_init(void)
907905
ip4_frags.frags_cache_name = ip_frag_cache_name;
908906
if (inet_frags_init(&ip4_frags))
909907
panic("IP: failed to allocate ip4_frags cache\n");
908+
ip4_frags_ctl_register();
909+
register_pernet_subsys(&ip4_frags_ops);
910910
}

0 commit comments

Comments
 (0)