summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/super.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-03-12 03:46:23 +0100
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 23:08:54 +0200
commit220d206232ba682002b06feb68969e462867f8f5 (patch)
tree26c13ccc5543cf421c4f9f5881acb11b9f170fb7 /fs/bcachefs/super.c
parentbcachefs: Fix bkey format generation for 32 bit fields (diff)
downloadlinux-220d206232ba682002b06feb68969e462867f8f5.tar.xz
linux-220d206232ba682002b06feb68969e462867f8f5.zip
bcachefs: Fix an allocator startup race
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to '')
-rw-r--r--fs/bcachefs/super.c2
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);