提交 9de69279 编写于 作者: C Chao Yu 提交者: Jaegeuk Kim

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: NChao Yu <yuchao0@huawei.com>
Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
上级 b691d98f
......@@ -1339,7 +1339,8 @@ int fsync_node_pages(struct f2fs_sb_info *sbi, struct inode *inode,
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 @@ int fsync_node_pages(struct f2fs_sb_info *sbi, struct inode *inode,
unlock_page(last_page);
goto retry;
}
out:
if (nwritten)
f2fs_submit_merged_bio_cond(sbi, NULL, NULL, ino, NODE, WRITE);
return ret ? -EIO: 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册