diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index c1ad9b278c47..0e607cb3bc9a 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -2244,7 +2244,9 @@ int f2fs_do_shutdown(struct f2fs_sb_info *sbi, unsigned int flag, if (ret) goto out; f2fs_stop_checkpoint(sbi, false, STOP_CP_REASON_SHUTDOWN); - bdev_thaw(sb->s_bdev); + ret = bdev_thaw(sb->s_bdev); + if (ret == -EINVAL) + goto out; break; case F2FS_GOING_DOWN_METASYNC: /* do checkpoint only */ diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index df4cf31f93df..e507379762ff 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -4177,7 +4177,7 @@ void f2fs_handle_critical_error(struct f2fs_sb_info *sbi, unsigned char reason, * RO by shutdown, since RO bypasses thaw_super which can hang the * system. */ - if (continue_fs || f2fs_readonly(sb) || shutdown) { + if (continue_fs || f2fs_readonly(sb)) { f2fs_warn(sbi, "Stopped filesystem due to reason: %d", reason); return; }