diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-09-15 11:15:18 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:12 -0400 |
commit | 3074bc0f7de749440c5e2b01a03ee2226fe69b52 (patch) | |
tree | 8b62867c476754094f45c773612f9ef8b451ec20 /fs/bcachefs/btree_locking.h | |
parent | aae4eea60cf0c824abe6be809f0260df8574f49a (diff) |
Revert "bcachefs: Add more assertions for locking btree iterators out of order"
Figured out the bug we were chasing, and it had nothing to do with
locking btree iterators/paths out of order.
This reverts commit ff08733dd298c969aec7c7828095458f73fd5374.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/btree_locking.h')
-rw-r--r-- | fs/bcachefs/btree_locking.h | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/fs/bcachefs/btree_locking.h b/fs/bcachefs/btree_locking.h index ff58870311f3..d05689180c63 100644 --- a/fs/bcachefs/btree_locking.h +++ b/fs/bcachefs/btree_locking.h @@ -57,8 +57,7 @@ static inline void mark_btree_node_unlocked(struct btree_path *path, path->nodes_intent_locked &= ~(1 << level); } -static inline void mark_btree_node_locked(struct btree_trans *trans, - struct btree_path *path, +static inline void mark_btree_node_locked(struct btree_path *path, unsigned level, enum six_lock_type type) { @@ -68,20 +67,12 @@ static inline void mark_btree_node_locked(struct btree_trans *trans, path->nodes_locked |= 1 << level; path->nodes_intent_locked |= type << level; -#ifdef CONFIG_BCACHEFS_DEBUG - path->ip_locked = _RET_IP_; - btree_trans_sort_paths(trans); - BUG_ON(trans->in_traverse_all && - trans->traverse_all_idx != U8_MAX && - path->sorted_idx > trans->paths[trans->traverse_all_idx].sorted_idx); -#endif } -static inline void mark_btree_node_intent_locked(struct btree_trans *trans, - struct btree_path *path, +static inline void mark_btree_node_intent_locked(struct btree_path *path, unsigned level) { - mark_btree_node_locked(trans, path, level, SIX_LOCK_intent); + mark_btree_node_locked(path, level, SIX_LOCK_intent); } static inline enum six_lock_type __btree_lock_want(struct btree_path *path, int level) @@ -120,9 +111,6 @@ static inline void __bch2_btree_path_unlock(struct btree_path *path) while (path->nodes_locked) btree_node_unlock(path, __ffs(path->nodes_locked)); -#ifdef CONFIG_BCACHEFS_DEBUG - path->ip_locked = 0; -#endif } static inline enum bch_time_stats lock_to_time_stat(enum six_lock_type type) |