diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c index 67bba156cce9..4ea754f57ed4 100644 --- a/fs/bcachefs/recovery.c +++ b/fs/bcachefs/recovery.c @@ -1079,6 +1079,9 @@ int bch2_fs_initialize(struct bch_fs *c) } } + for_each_online_member(c, ca) + ca->new_fs_bucket_idx = 0; + /* * Write out the superblock and journal buckets, now that we can do * btree updates @@ -1089,9 +1092,6 @@ int bch2_fs_initialize(struct bch_fs *c) if (ret) goto err; - for_each_online_member(c, ca) - ca->new_fs_bucket_idx = 0; - ret = bch2_fs_freespace_init(c); if (ret) goto err;