f2fs: stop issuing discard if fs is readonly
If filesystem is readonly, stop to issue discard in daemon. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
ae93dca264
commit
76688790c3
1 changed files with 2 additions and 0 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue