Skip to content

Commit efb2018

Browse files
author
Kent Overstreet
committed
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: Kent Overstreet <[email protected]>
1 parent ae46905 commit efb2018

File tree

3 files changed

+0
-22
lines changed

3 files changed

+0
-22
lines changed

fs/bcachefs/btree_io.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ void bch2_btree_node_io_unlock(struct btree *b)
4646

4747
void bch2_btree_node_io_lock(struct btree *b)
4848
{
49-
bch2_assert_btree_nodes_not_locked();
50-
5149
wait_on_bit_lock_io(&b->flags, BTREE_NODE_write_in_flight,
5250
TASK_UNINTERRUPTIBLE);
5351
}
@@ -66,16 +64,12 @@ void __bch2_btree_node_wait_on_write(struct btree *b)
6664

6765
void bch2_btree_node_wait_on_read(struct btree *b)
6866
{
69-
bch2_assert_btree_nodes_not_locked();
70-
7167
wait_on_bit_io(&b->flags, BTREE_NODE_read_in_flight,
7268
TASK_UNINTERRUPTIBLE);
7369
}
7470

7571
void bch2_btree_node_wait_on_write(struct btree *b)
7672
{
77-
bch2_assert_btree_nodes_not_locked();
78-
7973
wait_on_bit_io(&b->flags, BTREE_NODE_write_in_flight,
8074
TASK_UNINTERRUPTIBLE);
8175
}

fs/bcachefs/btree_locking.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,6 @@ void bch2_btree_lock_init(struct btree_bkey_cached_common *b,
1313
lockdep_set_notrack_class(&b->lock);
1414
}
1515

16-
#ifdef CONFIG_LOCKDEP
17-
void bch2_assert_btree_nodes_not_locked(void)
18-
{
19-
#if 0
20-
//Re-enable when lock_class_is_held() is merged:
21-
BUG_ON(lock_class_is_held(&bch2_btree_node_lock_key));
22-
#endif
23-
}
24-
#endif
25-
2616
/* Btree node locking: */
2717

2818
struct six_lock_count bch2_btree_node_lock_counts(struct btree_trans *trans,

fs/bcachefs/btree_locking.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,6 @@
1515

1616
void bch2_btree_lock_init(struct btree_bkey_cached_common *, enum six_lock_init_flags);
1717

18-
#ifdef CONFIG_LOCKDEP
19-
void bch2_assert_btree_nodes_not_locked(void);
20-
#else
21-
static inline void bch2_assert_btree_nodes_not_locked(void) {}
22-
#endif
23-
2418
void bch2_trans_unlock_noassert(struct btree_trans *);
2519

2620
static inline bool is_btree_node(struct btree_path *path, unsigned l)

0 commit comments

Comments
 (0)