Skip to content

Commit 264b501

Browse files
author
Kent Overstreet
committed
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 <[email protected]>
1 parent 109ea41 commit 264b501

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fs/bcachefs/extents.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,17 +108,17 @@ static inline void extent_entry_drop(struct bkey_s k, union bch_extent_entry *en
108108

109109
static inline bool extent_entry_is_ptr(const union bch_extent_entry *e)
110110
{
111-
return extent_entry_type(e) == BCH_EXTENT_ENTRY_ptr;
111+
return __extent_entry_type(e) == BCH_EXTENT_ENTRY_ptr;
112112
}
113113

114114
static inline bool extent_entry_is_stripe_ptr(const union bch_extent_entry *e)
115115
{
116-
return extent_entry_type(e) == BCH_EXTENT_ENTRY_stripe_ptr;
116+
return __extent_entry_type(e) == BCH_EXTENT_ENTRY_stripe_ptr;
117117
}
118118

119119
static inline bool extent_entry_is_crc(const union bch_extent_entry *e)
120120
{
121-
switch (extent_entry_type(e)) {
121+
switch (__extent_entry_type(e)) {
122122
case BCH_EXTENT_ENTRY_crc32:
123123
case BCH_EXTENT_ENTRY_crc64:
124124
case BCH_EXTENT_ENTRY_crc128:

0 commit comments

Comments
 (0)