diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-06-11 06:34:02 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:09:07 +0300 |
commit | 109a4277124ca1a0ff670b519315c4f381c83ad3 (patch) | |
tree | 5ba0c3e03befc1f046f203a1548bee7d7950661d /fs/bcachefs/util.h | |
parent | 297d89343dd9be32878a747c53d3477c986a01b6 (diff) | |
download | linux-109a4277124ca1a0ff670b519315c4f381c83ad3.tar.xz |
bcachefs: Don't disable preemption unnecessarily
Small improvements to some percpu utility code.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/util.h')
-rw-r--r-- | fs/bcachefs/util.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/bcachefs/util.h b/fs/bcachefs/util.h index 91aa8c0a0e09..a0cbebf190b4 100644 --- a/fs/bcachefs/util.h +++ b/fs/bcachefs/util.h @@ -715,10 +715,7 @@ static inline void percpu_u64_set(u64 __percpu *dst, u64 src) for_each_possible_cpu(cpu) *per_cpu_ptr(dst, cpu) = 0; - - preempt_disable(); - *this_cpu_ptr(dst) = src; - preempt_enable(); + this_cpu_write(*dst, src); } static inline void acc_u64s(u64 *acc, const u64 *src, unsigned nr) |