Commit 9cce45f2 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

net: rename inet_frags_init_net() to fdir_init()

And pass an extra parameter, since we will soon
dynamically allocate fqdir structures.
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d2dfd435
...@@ -104,8 +104,9 @@ struct inet_frags { ...@@ -104,8 +104,9 @@ struct inet_frags {
int inet_frags_init(struct inet_frags *); int inet_frags_init(struct inet_frags *);
void inet_frags_fini(struct inet_frags *); void inet_frags_fini(struct inet_frags *);
static inline int inet_frags_init_net(struct fqdir *fqdir) static inline int fqdir_init(struct fqdir *fqdir, struct inet_frags *f)
{ {
fqdir->f = f;
atomic_long_set(&fqdir->mem, 0); atomic_long_set(&fqdir->mem, 0);
return rhashtable_init(&fqdir->rhashtable, &fqdir->f->rhash_params); return rhashtable_init(&fqdir->rhashtable, &fqdir->f->rhash_params);
} }
......
...@@ -452,9 +452,8 @@ static int __net_init lowpan_frags_init_net(struct net *net) ...@@ -452,9 +452,8 @@ static int __net_init lowpan_frags_init_net(struct net *net)
ieee802154_lowpan->fqdir.high_thresh = IPV6_FRAG_HIGH_THRESH; ieee802154_lowpan->fqdir.high_thresh = IPV6_FRAG_HIGH_THRESH;
ieee802154_lowpan->fqdir.low_thresh = IPV6_FRAG_LOW_THRESH; ieee802154_lowpan->fqdir.low_thresh = IPV6_FRAG_LOW_THRESH;
ieee802154_lowpan->fqdir.timeout = IPV6_FRAG_TIMEOUT; ieee802154_lowpan->fqdir.timeout = IPV6_FRAG_TIMEOUT;
ieee802154_lowpan->fqdir.f = &lowpan_frags;
res = inet_frags_init_net(&ieee802154_lowpan->fqdir); res = fqdir_init(&ieee802154_lowpan->fqdir, &lowpan_frags);
if (res < 0) if (res < 0)
return res; return res;
res = lowpan_frags_ns_sysctl_register(net); res = lowpan_frags_ns_sysctl_register(net);
......
...@@ -672,9 +672,8 @@ static int __net_init ipv4_frags_init_net(struct net *net) ...@@ -672,9 +672,8 @@ static int __net_init ipv4_frags_init_net(struct net *net)
net->ipv4.fqdir.timeout = IP_FRAG_TIME; net->ipv4.fqdir.timeout = IP_FRAG_TIME;
net->ipv4.fqdir.max_dist = 64; net->ipv4.fqdir.max_dist = 64;
net->ipv4.fqdir.f = &ip4_frags;
res = inet_frags_init_net(&net->ipv4.fqdir); res = fqdir_init(&net->ipv4.fqdir, &ip4_frags);
if (res < 0) if (res < 0)
return res; return res;
res = ip4_frags_ns_ctl_register(net); res = ip4_frags_ns_ctl_register(net);
......
...@@ -494,9 +494,8 @@ static int nf_ct_net_init(struct net *net) ...@@ -494,9 +494,8 @@ static int nf_ct_net_init(struct net *net)
net->nf_frag.fqdir.high_thresh = IPV6_FRAG_HIGH_THRESH; net->nf_frag.fqdir.high_thresh = IPV6_FRAG_HIGH_THRESH;
net->nf_frag.fqdir.low_thresh = IPV6_FRAG_LOW_THRESH; net->nf_frag.fqdir.low_thresh = IPV6_FRAG_LOW_THRESH;
net->nf_frag.fqdir.timeout = IPV6_FRAG_TIMEOUT; net->nf_frag.fqdir.timeout = IPV6_FRAG_TIMEOUT;
net->nf_frag.fqdir.f = &nf_frags;
res = inet_frags_init_net(&net->nf_frag.fqdir); res = fqdir_init(&net->nf_frag.fqdir, &nf_frags);
if (res < 0) if (res < 0)
return res; return res;
res = nf_ct_frag6_sysctl_register(net); res = nf_ct_frag6_sysctl_register(net);
......
...@@ -515,9 +515,8 @@ static int __net_init ipv6_frags_init_net(struct net *net) ...@@ -515,9 +515,8 @@ static int __net_init ipv6_frags_init_net(struct net *net)
net->ipv6.fqdir.high_thresh = IPV6_FRAG_HIGH_THRESH; net->ipv6.fqdir.high_thresh = IPV6_FRAG_HIGH_THRESH;
net->ipv6.fqdir.low_thresh = IPV6_FRAG_LOW_THRESH; net->ipv6.fqdir.low_thresh = IPV6_FRAG_LOW_THRESH;
net->ipv6.fqdir.timeout = IPV6_FRAG_TIMEOUT; net->ipv6.fqdir.timeout = IPV6_FRAG_TIMEOUT;
net->ipv6.fqdir.f = &ip6_frags;
res = inet_frags_init_net(&net->ipv6.fqdir); res = fqdir_init(&net->ipv6.fqdir, &ip6_frags);
if (res < 0) if (res < 0)
return res; return res;
......
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