mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
net: remove bh disabling around percpu_counter accesses
Shaohua Li made percpu_counter irq safe in commit 098faf5805
("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>
This commit is contained in:
parent
0a327889f6
commit
c2a2efbbfc
6 changed files with 3 additions and 23 deletions
|
@ -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 :
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue