diff options
| author | Kent Overstreet | 2021-03-11 21:46:23 -0500 |
|---|---|---|
| committer | Kent Overstreet | 2023-10-22 17:08:54 -0400 |
| commit | 220d206232ba682002b06feb68969e462867f8f5 (patch) | |
| tree | 26c13ccc5543cf421c4f9f5881acb11b9f170fb7 | |
| parent | e01dacf76c0c6a5fc6963b7857773b3d58740acb (diff) | |
bcachefs: Fix an allocator startup race
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| -rw-r--r-- | fs/bcachefs/super.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/super.c b/fs/bcachefs/super.c index 224c21c3f9f7..19399447f379 100644 --- a/fs/bcachefs/super.c +++ b/fs/bcachefs/super.c @@ -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); |
