mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
fs: Use this_cpu_inc_return in buffer.c
__this_cpu_inc can create a single instruction with the same effect as the _get_cpu_var(..)++ construct in buffer.c. Cc: Wu Fengguang <[email protected]> Cc: Christoph Hellwig <[email protected]> Acked-by: H. Peter Anvin <[email protected]> Signed-off-by: Christoph Lameter <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
This commit is contained in:
parent
cfb8243495
commit
ee1be86263
1 changed files with 1 additions and 1 deletions
|
|
@ -3201,7 +3201,7 @@ static void recalc_bh_state(void)
|
|||
int i;
|
||||
int tot = 0;
|
||||
|
||||
if (__get_cpu_var(bh_accounting).ratelimit++ < 4096)
|
||||
if (__this_cpu_inc_return(bh_accounting.ratelimit) - 1 < 4096)
|
||||
return;
|
||||
__this_cpu_write(bh_accounting.ratelimit, 0);
|
||||
for_each_online_cpu(i)
|
||||
|
|
|
|||
Loading…
Reference in a new issue