summaryrefslogtreecommitdiff
path: root/include/net/inet_frag.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2017-01-20 05:06:08 -0800
committerDavid S. Miller <davem@davemloft.net>2017-01-20 11:27:22 -0500
commitc2a2efbbfcb31bedcf81170fc1aa920255c33b8f (patch)
tree0feeac1e086d1179ce3bce1482d5cd27653aa33a /include/net/inet_frag.h
parent0a327889f64619ac3ec886208644191cd87de525 (diff)
downloadlwn-c2a2efbbfcb31bedcf81170fc1aa920255c33b8f.tar.gz
lwn-c2a2efbbfcb31bedcf81170fc1aa920255c33b8f.zip
net: remove bh disabling around percpu_counter accesses
Shaohua Li made percpu_counter irq safe in commit 098faf5805c8 ("percpu_counter: make APIs irq safe") We can safely remove BH disable/enable sections around various percpu_counter manipulations. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/inet_frag.h')
-rw-r--r--include/net/inet_frag.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h
index 909972aa3acd..5894730ec82a 100644
--- a/include/net/inet_frag.h
+++ b/include/net/inet_frag.h
@@ -164,13 +164,7 @@ static inline void add_frag_mem_limit(struct netns_frags *nf, int i)
static inline unsigned int sum_frag_mem_limit(struct netns_frags *nf)
{
- unsigned int res;
-
- local_bh_disable();
- res = percpu_counter_sum_positive(&nf->mem);
- local_bh_enable();
-
- return res;
+ return percpu_counter_sum_positive(&nf->mem);
}
/* RFC 3168 support :