Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f368156e authored by Chao Yu's avatar Chao Yu Committed by Jaegeuk Kim
Browse files

f2fs: stop issuing discard if fs is readonly



If filesystem is readonly, stop to issue discard in daemon.

Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent be823aa3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1487,6 +1487,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;