Commit efb2018e authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: Kill bch2_assert_btree_nodes_not_locked()

We no longer track individual btree node locks with lockdep, so this
will never be enabled.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent ae469056
...@@ -46,8 +46,6 @@ void bch2_btree_node_io_unlock(struct btree *b) ...@@ -46,8 +46,6 @@ void bch2_btree_node_io_unlock(struct btree *b)
void bch2_btree_node_io_lock(struct btree *b) void bch2_btree_node_io_lock(struct btree *b)
{ {
bch2_assert_btree_nodes_not_locked();
wait_on_bit_lock_io(&b->flags, BTREE_NODE_write_in_flight, wait_on_bit_lock_io(&b->flags, BTREE_NODE_write_in_flight,
TASK_UNINTERRUPTIBLE); TASK_UNINTERRUPTIBLE);
} }
...@@ -66,16 +64,12 @@ void __bch2_btree_node_wait_on_write(struct btree *b) ...@@ -66,16 +64,12 @@ void __bch2_btree_node_wait_on_write(struct btree *b)
void bch2_btree_node_wait_on_read(struct btree *b) void bch2_btree_node_wait_on_read(struct btree *b)
{ {
bch2_assert_btree_nodes_not_locked();
wait_on_bit_io(&b->flags, BTREE_NODE_read_in_flight, wait_on_bit_io(&b->flags, BTREE_NODE_read_in_flight,
TASK_UNINTERRUPTIBLE); TASK_UNINTERRUPTIBLE);
} }
void bch2_btree_node_wait_on_write(struct btree *b) void bch2_btree_node_wait_on_write(struct btree *b)
{ {
bch2_assert_btree_nodes_not_locked();
wait_on_bit_io(&b->flags, BTREE_NODE_write_in_flight, wait_on_bit_io(&b->flags, BTREE_NODE_write_in_flight,
TASK_UNINTERRUPTIBLE); TASK_UNINTERRUPTIBLE);
} }
......
...@@ -13,16 +13,6 @@ void bch2_btree_lock_init(struct btree_bkey_cached_common *b, ...@@ -13,16 +13,6 @@ void bch2_btree_lock_init(struct btree_bkey_cached_common *b,
lockdep_set_notrack_class(&b->lock); lockdep_set_notrack_class(&b->lock);
} }
#ifdef CONFIG_LOCKDEP
void bch2_assert_btree_nodes_not_locked(void)
{
#if 0
//Re-enable when lock_class_is_held() is merged:
BUG_ON(lock_class_is_held(&bch2_btree_node_lock_key));
#endif
}
#endif
/* Btree node locking: */ /* Btree node locking: */
struct six_lock_count bch2_btree_node_lock_counts(struct btree_trans *trans, struct six_lock_count bch2_btree_node_lock_counts(struct btree_trans *trans,
......
...@@ -15,12 +15,6 @@ ...@@ -15,12 +15,6 @@
void bch2_btree_lock_init(struct btree_bkey_cached_common *, enum six_lock_init_flags); void bch2_btree_lock_init(struct btree_bkey_cached_common *, enum six_lock_init_flags);
#ifdef CONFIG_LOCKDEP
void bch2_assert_btree_nodes_not_locked(void);
#else
static inline void bch2_assert_btree_nodes_not_locked(void) {}
#endif
void bch2_trans_unlock_noassert(struct btree_trans *); void bch2_trans_unlock_noassert(struct btree_trans *);
static inline bool is_btree_node(struct btree_path *path, unsigned l) static inline bool is_btree_node(struct btree_path *path, unsigned l)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment