Commit 0dd092bf authored by Kent Overstreet's avatar Kent Overstreet

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: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 20e425d3
......@@ -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,
......
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