|
|
@@ -247,6 +247,10 @@ int f2fs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
|
|
|
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);
|