diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-03-16 21:22:24 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-03-17 20:53:11 -0400 |
commit | 264b501f8f214d8443292dd254aa387dba59159a (patch) | |
tree | 35c14193560f203f85f0d8004ae4b33457095ac6 /fs/bcachefs/extents.h | |
parent | 109ea419cf94afd94ae7840a93bcb1cd3eb5cea9 (diff) | |
download | lwn-264b501f8f214d8443292dd254aa387dba59159a.tar.gz lwn-264b501f8f214d8443292dd254aa387dba59159a.zip |
bcachefs: Avoid extent entry type assertions in .invalid()
After keys have passed bkey_ops.key_invalid we should never see invalid
extent entry types - but .key_invalid itself needs to cope with them.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/extents.h')
-rw-r--r-- | fs/bcachefs/extents.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/bcachefs/extents.h b/fs/bcachefs/extents.h index 6219f2c08e4c..fd2669cdd76f 100644 --- a/fs/bcachefs/extents.h +++ b/fs/bcachefs/extents.h @@ -108,17 +108,17 @@ static inline void extent_entry_drop(struct bkey_s k, union bch_extent_entry *en static inline bool extent_entry_is_ptr(const union bch_extent_entry *e) { - return extent_entry_type(e) == BCH_EXTENT_ENTRY_ptr; + return __extent_entry_type(e) == BCH_EXTENT_ENTRY_ptr; } static inline bool extent_entry_is_stripe_ptr(const union bch_extent_entry *e) { - return extent_entry_type(e) == BCH_EXTENT_ENTRY_stripe_ptr; + return __extent_entry_type(e) == BCH_EXTENT_ENTRY_stripe_ptr; } static inline bool extent_entry_is_crc(const union bch_extent_entry *e) { - switch (extent_entry_type(e)) { + switch (__extent_entry_type(e)) { case BCH_EXTENT_ENTRY_crc32: case BCH_EXTENT_ENTRY_crc64: case BCH_EXTENT_ENTRY_crc128: |