Loading fs/f2fs/file.c +3 −1 Original line number Diff line number Diff line Loading @@ -256,7 +256,9 @@ int f2fs_sync_file(struct file *file, loff_t start, loff_t end, int datasync) goto out; } sync_nodes: fsync_node_pages(sbi, ino, &wbc); ret = fsync_node_pages(sbi, ino, &wbc); if (ret) goto out; /* if cp_error was enabled, we should avoid infinite loop */ if (unlikely(f2fs_cp_error(sbi))) { Loading fs/f2fs/node.c +6 −7 Original line number Diff line number Diff line Loading @@ -1227,7 +1227,7 @@ int fsync_node_pages(struct f2fs_sb_info *sbi, nid_t ino, { pgoff_t index, end; struct pagevec pvec; int nwritten = 0; int ret = 0; pagevec_init(&pvec, 0); index = 0; Loading Loading @@ -1278,21 +1278,20 @@ int fsync_node_pages(struct f2fs_sb_info *sbi, nid_t ino, if (IS_INODE(page)) set_dentry_mark(page, need_dentry_mark(sbi, ino)); nwritten++; if (NODE_MAPPING(sbi)->a_ops->writepage(page, wbc)) ret = NODE_MAPPING(sbi)->a_ops->writepage(page, wbc); if (ret) { unlock_page(page); if (--wbc->nr_to_write == 0) break; } } pagevec_release(&pvec); cond_resched(); if (wbc->nr_to_write == 0) if (ret) break; } return nwritten; return ret ? -EIO: 0; } int sync_node_pages(struct f2fs_sb_info *sbi, struct writeback_control *wbc) Loading Loading
fs/f2fs/file.c +3 −1 Original line number Diff line number Diff line Loading @@ -256,7 +256,9 @@ int f2fs_sync_file(struct file *file, loff_t start, loff_t end, int datasync) goto out; } sync_nodes: fsync_node_pages(sbi, ino, &wbc); ret = fsync_node_pages(sbi, ino, &wbc); if (ret) goto out; /* if cp_error was enabled, we should avoid infinite loop */ if (unlikely(f2fs_cp_error(sbi))) { Loading
fs/f2fs/node.c +6 −7 Original line number Diff line number Diff line Loading @@ -1227,7 +1227,7 @@ int fsync_node_pages(struct f2fs_sb_info *sbi, nid_t ino, { pgoff_t index, end; struct pagevec pvec; int nwritten = 0; int ret = 0; pagevec_init(&pvec, 0); index = 0; Loading Loading @@ -1278,21 +1278,20 @@ int fsync_node_pages(struct f2fs_sb_info *sbi, nid_t ino, if (IS_INODE(page)) set_dentry_mark(page, need_dentry_mark(sbi, ino)); nwritten++; if (NODE_MAPPING(sbi)->a_ops->writepage(page, wbc)) ret = NODE_MAPPING(sbi)->a_ops->writepage(page, wbc); if (ret) { unlock_page(page); if (--wbc->nr_to_write == 0) break; } } pagevec_release(&pvec); cond_resched(); if (wbc->nr_to_write == 0) if (ret) break; } return nwritten; return ret ? -EIO: 0; } int sync_node_pages(struct f2fs_sb_info *sbi, struct writeback_control *wbc) Loading