From 24f2efc9ae763729da95d7768fef878b2eef6f71 Mon Sep 17 00:00:00 2001 From: Hashcode Date: Wed, 28 May 2014 14:18:31 -0700 Subject: f2fs: backport k3.0 re-add start/end params to f2fs_sync_file Change-Id: I47df9dba3a37eae26d4d7bec9ed4700b14ea7f84 --- fs/f2fs/file.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'fs/f2fs/file.c') diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 485919d..a72ecd9 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -110,7 +110,7 @@ static int get_parent_ino(struct inode *inode, nid_t *pino) return 1; } -int f2fs_sync_file(struct file *file, int datasync) +int f2fs_sync_file(struct file *file, loff_t start, loff_t end, int datasync) { struct inode *inode = file->f_mapping->host; struct f2fs_sb_info *sbi = F2FS_SB(inode->i_sb); @@ -126,6 +126,11 @@ int f2fs_sync_file(struct file *file, int datasync) return 0; trace_f2fs_sync_file_enter(inode); + ret = filemap_write_and_wait_range(inode->i_mapping, start, end); + if (ret) { + trace_f2fs_sync_file_exit(inode, need_cp, datasync, ret); + return ret; + } /* guarantee free sections for fsync */ f2fs_balance_fs(sbi); -- cgit v1.1