mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
f2fs: fix error path of move_data_page
This patch fixes error path of move_data_page: - clear cold data flag if it fails to write page. - redirty page for non-ENOMEM case. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
1b8f49aeb0
commit
46df5fe2ba
11
fs/f2fs/gc.c
11
fs/f2fs/gc.c
@ -780,9 +780,14 @@ retry:
|
||||
set_cold_data(page);
|
||||
|
||||
err = do_write_data_page(&fio);
|
||||
if (err == -ENOMEM && is_dirty) {
|
||||
congestion_wait(BLK_RW_ASYNC, HZ/50);
|
||||
goto retry;
|
||||
if (err) {
|
||||
clear_cold_data(page);
|
||||
if (err == -ENOMEM) {
|
||||
congestion_wait(BLK_RW_ASYNC, HZ/50);
|
||||
goto retry;
|
||||
}
|
||||
if (is_dirty)
|
||||
set_page_dirty(page);
|
||||
}
|
||||
}
|
||||
out:
|
||||
|
Loading…
x
Reference in New Issue
Block a user