diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2020-12-16 22:18:33 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:08:50 +0300 |
commit | ded54580bdf18ba3a2b38e7910c54b1c53f007c6 (patch) | |
tree | 32ccba1206735a8aa61d558f7e62fbe779033d29 /fs/bcachefs/util.h | |
parent | 1d8305c11a289a13591d4c51726803cd37d8f646 (diff) | |
download | linux-ded54580bdf18ba3a2b38e7910c54b1c53f007c6.tar.xz |
bcachefs: Check for duplicate device ptrs in bch2_bkey_ptrs_invalid()
This is something we clearly should be checking for, but weren't -
oops.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/util.h')
-rw-r--r-- | fs/bcachefs/util.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/bcachefs/util.h b/fs/bcachefs/util.h index 7b7c638d8904..91aa8c0a0e09 100644 --- a/fs/bcachefs/util.h +++ b/fs/bcachefs/util.h @@ -750,4 +750,9 @@ u64 *bch2_acc_percpu_u64s(u64 __percpu *, unsigned); #define cmp_int(l, r) ((l > r) - (l < r)) +static inline int u8_cmp(u8 l, u8 r) +{ + return cmp_int(l, r); +} + #endif /* _BCACHEFS_UTIL_H */ |