summaryrefslogtreecommitdiffstats
path: root/include/net/dst_ops.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2017-01-20 14:06:08 +0100
committerDavid S. Miller <davem@davemloft.net>2017-01-20 17:27:22 +0100
commitc2a2efbbfcb31bedcf81170fc1aa920255c33b8f (patch)
tree0feeac1e086d1179ce3bce1482d5cd27653aa33a /include/net/dst_ops.h
parentcxgb4: hide unused warnings (diff)
downloadlinux-c2a2efbbfcb31bedcf81170fc1aa920255c33b8f.tar.xz
linux-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/dst_ops.h')
-rw-r--r--include/net/dst_ops.h9
1 files changed, 1 insertions, 8 deletions
diff --git a/include/net/dst_ops.h b/include/net/dst_ops.h
index a0d443ca16fc..8a2b66d8d78d 100644
--- a/include/net/dst_ops.h
+++ b/include/net/dst_ops.h
@@ -46,19 +46,12 @@ static inline int dst_entries_get_fast(struct dst_ops *dst)
static inline int dst_entries_get_slow(struct dst_ops *dst)
{
- int res;
-
- local_bh_disable();
- res = percpu_counter_sum_positive(&dst->pcpuc_entries);
- local_bh_enable();
- return res;
+ return percpu_counter_sum_positive(&dst->pcpuc_entries);
}
static inline void dst_entries_add(struct dst_ops *dst, int val)
{
- local_bh_disable();
percpu_counter_add(&dst->pcpuc_entries, val);
- local_bh_enable();
}
static inline int dst_entries_init(struct dst_ops *dst)