diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-06-17 13:39:02 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-06-17 14:08:42 -0400 |
commit | d915c62f17ae8d8214819fe150422d32c5b1c79c (patch) | |
tree | acdb02a2786449553503dcd8b5bcf100f28c1750 /libbcachefs/util.h | |
parent | fc06a0ea5e552663e9e47de941fbc7e621d4ca46 (diff) |
Update bcachefs sources to 792ca5ba3c9a bcachefs: kill key cache arg to bch2_assert_pos_locked()
Diffstat (limited to 'libbcachefs/util.h')
-rw-r--r-- | libbcachefs/util.h | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/libbcachefs/util.h b/libbcachefs/util.h index 76ffe08e..f4dd09c4 100644 --- a/libbcachefs/util.h +++ b/libbcachefs/util.h @@ -697,19 +697,14 @@ do { \ } \ } while (0) -#define per_cpu_sum(_p) \ -({ \ - typeof(*_p) _ret = 0; \ - \ - int cpu; \ - for_each_possible_cpu(cpu) \ - _ret += *per_cpu_ptr(_p, cpu); \ - _ret; \ -}) - static inline u64 percpu_u64_get(u64 __percpu *src) { - return per_cpu_sum(src); + u64 ret = 0; + int cpu; + + for_each_possible_cpu(cpu) + ret += *per_cpu_ptr(src, cpu); + return ret; } static inline void percpu_u64_set(u64 __percpu *dst, u64 src) |