diff options
-rw-r--r-- | fs/f2fs/super.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 8ac4734c2df6..df32573d1f62 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -4159,9 +4159,15 @@ void f2fs_handle_critical_error(struct f2fs_sb_info *sbi, unsigned char reason, if (shutdown) set_sbi_flag(sbi, SBI_IS_SHUTDOWN); - /* continue filesystem operators if errors=continue */ - if (continue_fs || f2fs_readonly(sb)) + /* + * Continue filesystem operators if errors=continue. Should not set + * RO by shutdown, since RO bypasses thaw_super which can hang the + * system. + */ + if (continue_fs || f2fs_readonly(sb) || shutdown) { + f2fs_warn(sbi, "Stopped filesystem due to reason: %d", reason); return; + } f2fs_warn(sbi, "Remounting filesystem read-only"); /* |