Commit 871f599f authored by Jaegeuk Kim's avatar Jaegeuk Kim
Browse files

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: default avatarJaegeuk Kim <>
parent 08e4126e
......@@ -247,6 +247,10 @@ int f2fs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
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)) {
f2fs_write_inode(inode, NULL);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment