From 64833f8b384228f879309a13db0069114a6697a6 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Sat, 9 Mar 2019 14:53:03 -0500 Subject: bcachefs: Fix for shutting down before fs started marking it clean --- fs/bcachefs/super.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/bcachefs/super.c b/fs/bcachefs/super.c index 4ec8a0b5a93c..1b3891726639 100644 --- a/fs/bcachefs/super.c +++ b/fs/bcachefs/super.c @@ -330,7 +330,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) -- cgit v1.2.3