f2fs: avoid infinite loop on cp_error

If cp_error is set, we should avoid all the infinite loop.
In f2fs_sync_file, there is a hole, and this patch fixes that.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
这个提交包含在:
Jaegeuk Kim
2015-01-09 16:27:17 -08:00
父节点 08e4126e1e
当前提交 871f599f4a

查看文件

@@ -247,6 +247,10 @@ go_write:
sync_nodes:
sync_node_pages(sbi, ino, &wbc);
/* if cp_error was enabled, we should avoid infinite loop */
if (unlikely(f2fs_cp_error(sbi)))
goto out;
if (need_inode_block_update(sbi, ino)) {
mark_inode_dirty_sync(inode);
f2fs_write_inode(inode, NULL);