1
0
Fork 0

f2fs: fix error handling in fsync_node_pages

In fsync_node_pages, if f2fs was taged with CP_ERROR_FLAG, make sure bio
cache was flushed before return.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
hifive-unleashed-5.1
Chao Yu 2016-10-11 22:57:06 +08:00 committed by Jaegeuk Kim
parent b691d98fdd
commit 9de6927975
1 changed files with 3 additions and 2 deletions

View File

@ -1339,7 +1339,8 @@ retry:
if (unlikely(f2fs_cp_error(sbi))) {
f2fs_put_page(last_page, 0);
pagevec_release(&pvec);
return -EIO;
ret = -EIO;
goto out;
}
if (!IS_DNODE(page) || !is_cold_node(page))
@ -1412,7 +1413,7 @@ continue_unlock:
unlock_page(last_page);
goto retry;
}
out:
if (nwritten)
f2fs_submit_merged_bio_cond(sbi, NULL, NULL, ino, NODE, WRITE);
return ret ? -EIO: 0;