From: Kent Overstreet Date: Sat, 9 Mar 2019 19:53:03 +0000 (-0500) Subject: bcachefs: Fix for shutting down before fs started marking it clean X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=3aea434272884b8dc77c57624a6d3fec55ade898;p=linux.git bcachefs: Fix for shutting down before fs started marking it clean Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/super.c b/fs/bcachefs/super.c index c79aa11f2120f..4f627e91f0416 100644 --- a/fs/bcachefs/super.c +++ b/fs/bcachefs/super.c @@ -299,7 +299,8 @@ void bch2_fs_read_only(struct bch_fs *c) if (!bch2_journal_error(&c->journal) && !test_bit(BCH_FS_ERROR, &c->flags) && - !test_bit(BCH_FS_EMERGENCY_RO, &c->flags)) + !test_bit(BCH_FS_EMERGENCY_RO, &c->flags) && + test_bit(BCH_FS_STARTED, &c->flags)) bch2_fs_mark_clean(c, true); if (c->state != BCH_FS_STOPPING)