bcachefs: Fix lock ordering with snapshot_create_lock
We must not hold btree locks while taking snapshot_create_lock - this fixes a lockdep splat. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
20e425d301
commit
0dd092bf10
@ -1447,6 +1447,7 @@ int bch2_delete_dead_snapshots(struct bch_fs *c)
|
||||
}
|
||||
}
|
||||
|
||||
bch2_trans_unlock(trans);
|
||||
down_write(&c->snapshot_create_lock);
|
||||
|
||||
for_each_btree_key(trans, iter, BTREE_ID_snapshots,
|
||||
|
Loading…
Reference in New Issue
Block a user