diff options
author | Hashcode <hashcode0f@gmail.com> | 2014-05-28 14:18:31 -0700 |
---|---|---|
committer | Andreas Blaesius <skate4life@gmx.de> | 2016-06-05 21:21:12 +0200 |
commit | 24f2efc9ae763729da95d7768fef878b2eef6f71 (patch) | |
tree | 9d48ded92b47b1b211e64992699ad82c35a42a16 /fs/f2fs/file.c | |
parent | 4e16e118f4291b49cffd32749e1ae95ac8b73917 (diff) | |
download | kernel_samsung_espresso10-24f2efc9ae763729da95d7768fef878b2eef6f71.zip kernel_samsung_espresso10-24f2efc9ae763729da95d7768fef878b2eef6f71.tar.gz kernel_samsung_espresso10-24f2efc9ae763729da95d7768fef878b2eef6f71.tar.bz2 |
f2fs: backport k3.0 re-add start/end params to f2fs_sync_file
Change-Id: I47df9dba3a37eae26d4d7bec9ed4700b14ea7f84
Diffstat (limited to 'fs/f2fs/file.c')
-rw-r--r-- | fs/f2fs/file.c | 7 |
1 files changed, 6 insertions, 1 deletions
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); |