diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-09-26 15:58:02 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-09-27 21:46:35 -0400 |
commit | f8911ad88de3acea7a67451f59649bb54da0741b (patch) | |
tree | d544a2bc65e02955aa5b86d97d23b56c5e5245b7 /fs/bcachefs/bkey.h | |
parent | cf49f8a8c277f9f2b78e2a56189a741a508a9820 (diff) | |
download | lwn-f8911ad88de3acea7a67451f59649bb54da0741b.tar.gz lwn-f8911ad88de3acea7a67451f59649bb54da0741b.zip |
bcachefs: Check for accounting keys with bversion=0
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/bkey.h')
-rw-r--r-- | fs/bcachefs/bkey.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/bkey.h b/fs/bcachefs/bkey.h index 6e5092d4c62e..41df24a53d97 100644 --- a/fs/bcachefs/bkey.h +++ b/fs/bcachefs/bkey.h @@ -214,9 +214,9 @@ static __always_inline int bversion_cmp(struct bversion l, struct bversion r) #define ZERO_VERSION ((struct bversion) { .hi = 0, .lo = 0 }) #define MAX_VERSION ((struct bversion) { .hi = ~0, .lo = ~0ULL }) -static __always_inline int bversion_zero(struct bversion v) +static __always_inline bool bversion_zero(struct bversion v) { - return !bversion_cmp(v, ZERO_VERSION); + return bversion_cmp(v, ZERO_VERSION) == 0; } #ifdef CONFIG_BCACHEFS_DEBUG |