Messages in this thread Patch in this message | | | From | Chao Yu <> | Subject | [PATCH 3/3] f2fs: stop issuing discard if fs is readonly | Date | Thu, 25 Jan 2018 18:57:27 +0800 |
| |
If filesystem is readonly, stop to issue discard in daemon.
Signed-off-by: Chao Yu <yuchao0@huawei.com> --- fs/f2fs/segment.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 34206acb883b..7b5d0634d29b 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; -- 2.15.0.55.gc2ece9dc4de6
| |