diff options
author | David S. Miller <davem@davemloft.net> | 2017-09-05 20:03:35 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-09-05 20:03:35 -0700 |
commit | 18fb0b46d555dc42f52f69428dcd52f133877078 (patch) | |
tree | 7696741f50fb1a373aee3601074e30f6e366e425 /net/ipv4 | |
parent | 39cebdb77d55a193492a42170bf1c3d11e41e740 (diff) | |
parent | 6d9c153a0b84392406bc77600aa7d3ea365de041 (diff) | |
download | blackbird-op-linux-18fb0b46d555dc42f52f69428dcd52f133877078.tar.gz blackbird-op-linux-18fb0b46d555dc42f52f69428dcd52f133877078.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/inet_fragment.c | 4 | ||||
-rw-r--r-- | net/ipv4/ip_fragment.c | 12 |
2 files changed, 4 insertions, 12 deletions
diff --git a/net/ipv4/inet_fragment.c b/net/ipv4/inet_fragment.c index 96e95e83cc61..af74d0433453 100644 --- a/net/ipv4/inet_fragment.c +++ b/net/ipv4/inet_fragment.c @@ -234,10 +234,8 @@ evict_again: cond_resched(); if (read_seqretry(&f->rnd_seqlock, seq) || - percpu_counter_sum(&nf->mem)) + sum_frag_mem_limit(nf)) goto evict_again; - - percpu_counter_destroy(&nf->mem); } EXPORT_SYMBOL(inet_frags_exit_net); diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c index 9a8cfac503dc..46408c220d9d 100644 --- a/net/ipv4/ip_fragment.c +++ b/net/ipv4/ip_fragment.c @@ -844,8 +844,6 @@ static void __init ip4_frags_ctl_register(void) static int __net_init ipv4_frags_init_net(struct net *net) { - int res; - /* Fragment cache limits. * * The fragment memory accounting code, (tries to) account for @@ -871,13 +869,9 @@ static int __net_init ipv4_frags_init_net(struct net *net) net->ipv4.frags.max_dist = 64; - res = inet_frags_init_net(&net->ipv4.frags); - if (res) - return res; - res = ip4_frags_ns_ctl_register(net); - if (res) - inet_frags_uninit_net(&net->ipv4.frags); - return res; + inet_frags_init_net(&net->ipv4.frags); + + return ip4_frags_ns_ctl_register(net); } static void __net_exit ipv4_frags_exit_net(struct net *net) |