diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 9c09e2c967059fd45547f603da6ed9a3f092c35a..ca1f567f701af68cd746060b6b5921fc56fa3ea4 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -1406,6 +1406,8 @@ static int issue_discard_thread(void *data) msecs_to_jiffies(wait_ms)); if (try_to_freeze()) continue; + if (f2fs_readonly(sbi->sb)) + continue; if (kthread_should_stop()) return 0;