summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/bcachefs/super.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/bcachefs/super.c b/fs/bcachefs/super.c
index 4cc4301ceae7..e3129dd6d3d8 100644
--- a/fs/bcachefs/super.c
+++ b/fs/bcachefs/super.c
@@ -214,15 +214,15 @@ static void __bch2_fs_read_only(struct bch_fs *c)
*/
bch2_journal_flush_all_pins(&c->journal);
- if (!bch2_journal_error(&c->journal) &&
- !test_bit(BCH_FS_ERROR, &c->flags))
- bch2_btree_verify_flushed(c);
-
for_each_member_device(ca, c, i)
bch2_dev_allocator_stop(ca);
bch2_fs_journal_stop(&c->journal);
+ if (!bch2_journal_error(&c->journal) &&
+ !test_bit(BCH_FS_ERROR, &c->flags))
+ bch2_btree_verify_flushed(c);
+
for_each_member_device(ca, c, i)
bch2_dev_allocator_remove(c, ca);
}