diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-09-09 21:14:54 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-09-09 21:19:58 -0400 |
commit | 5a53409a3f030b1f1d834babb17cc87ff1359d5f (patch) | |
tree | d50ceafc083a1238784fb93cf5ba951d387f14ca /fs/bcachefs/btree_locking.h | |
parent | 5f320504084259a78b3a3fa34f7eb65ef7faa245 (diff) |
bcachefs: Fix silent enum conversion errorbcachefs-for-v6.6
This changes mark_btree_node_locked() to take an enum
btree_node_locked_type, not a six_lock_type, since BTREE_NODE_UNLOCKED
is -1 which may cause problems converting back and forth to
six_lock_type if short enums are in use.
With this change, we never store BTREE_NODE_UNLOCKED in a six_lock_type
enum.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_locking.h')
-rw-r--r-- | fs/bcachefs/btree_locking.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/btree_locking.h b/fs/bcachefs/btree_locking.h index 22e2cd3914a5..6231e9ffc5d7 100644 --- a/fs/bcachefs/btree_locking.h +++ b/fs/bcachefs/btree_locking.h @@ -91,7 +91,7 @@ static inline void mark_btree_node_unlocked(struct btree_path *path, static inline void mark_btree_node_locked(struct btree_trans *trans, struct btree_path *path, unsigned level, - enum six_lock_type type) + enum btree_node_locked_type type) { mark_btree_node_locked_noreset(path, level, (enum btree_node_locked_type) type); #ifdef CONFIG_BCACHEFS_LOCK_TIME_STATS |