mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-04 02:34:10 -04:00
bcachefs: Fix an allocator startup race
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
committed by
Kent Overstreet
parent
e01dacf76c
commit
220d206232
@@ -1177,6 +1177,8 @@ static int bch2_dev_alloc(struct bch_fs *c, unsigned dev_idx)
|
||||
if (!ca)
|
||||
goto err;
|
||||
|
||||
ca->fs = c;
|
||||
|
||||
if (ca->mi.state == BCH_MEMBER_STATE_RW &&
|
||||
bch2_dev_allocator_start(ca)) {
|
||||
bch2_dev_free(ca);
|
||||
|
||||
Reference in New Issue
Block a user