f2fs: fix to check page dirty status before writeback
In f2fs_write_raw_pages(), we need to check page dirty status before writeback, because there could be a racer (e.g. reclaimer) helps writebacking the dirty page. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
d078319d06
commit
eb1353cfa9
@ -1322,6 +1322,12 @@ retry_write:
|
||||
congestion_wait(BLK_RW_ASYNC,
|
||||
DEFAULT_IO_TIMEOUT);
|
||||
lock_page(cc->rpages[i]);
|
||||
|
||||
if (!PageDirty(cc->rpages[i])) {
|
||||
unlock_page(cc->rpages[i]);
|
||||
continue;
|
||||
}
|
||||
|
||||
clear_page_dirty_for_io(cc->rpages[i]);
|
||||
goto retry_write;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user