mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-11 00:08:50 +00:00
bcachefs: Fix a locking bug
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
6639339253
commit
053dbb377d
@ -883,6 +883,7 @@ static int bch2_invalidate_buckets(struct bch_fs *c, struct bch_dev *ca)
|
||||
|
||||
ret = __bch2_alloc_write_key(c, ca, b, &iter,
|
||||
must_flush ? &journal_seq : NULL,
|
||||
BTREE_INSERT_GC_LOCK_HELD|
|
||||
!fifo_empty(&ca->free_inc) ? BTREE_INSERT_NOWAIT : 0);
|
||||
}
|
||||
|
||||
|
@ -624,6 +624,9 @@ int __bch2_btree_insert_at(struct btree_insert *trans)
|
||||
/* for the sake of sanity: */
|
||||
BUG_ON(trans->nr > 1 && !(trans->flags & BTREE_INSERT_ATOMIC));
|
||||
|
||||
if (trans->flags & BTREE_INSERT_GC_LOCK_HELD)
|
||||
lockdep_assert_held(&c->gc_lock);
|
||||
|
||||
bubble_sort(trans->entries, trans->nr, btree_trans_cmp);
|
||||
|
||||
trans_for_each_entry(trans, i)
|
||||
|
Loading…
x
Reference in New Issue
Block a user