summaryrefslogtreecommitdiff
path: root/fs/bcachefs/util.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-06-11 06:34:02 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:09:07 +0300
commit109a4277124ca1a0ff670b519315c4f381c83ad3 (patch)
tree5ba0c3e03befc1f046f203a1548bee7d7950661d /fs/bcachefs/util.c
parent297d89343dd9be32878a747c53d3477c986a01b6 (diff)
downloadlinux-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.c')
-rw-r--r--fs/bcachefs/util.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/bcachefs/util.c b/fs/bcachefs/util.c
index f183c9d80e2c..f287bca8498d 100644
--- a/fs/bcachefs/util.c
+++ b/fs/bcachefs/util.c
@@ -893,13 +893,9 @@ void eytzinger0_find_test(void)
*/
u64 *bch2_acc_percpu_u64s(u64 __percpu *p, unsigned nr)
{
- u64 *ret;
+ u64 *ret = this_cpu_ptr(p);
int cpu;
- preempt_disable();
- ret = this_cpu_ptr(p);
- preempt_enable();
-
for_each_possible_cpu(cpu) {
u64 *i = per_cpu_ptr(p, cpu);