From: Jaegeuk Kim Date: Sat, 16 Mar 2013 02:13:04 +0000 (+0900) Subject: f2fs: fix to call WRITE_FLUSH at the end of fsync X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ae51fb31b8c3eb0cedc223782832be393e53623b;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git f2fs: fix to call WRITE_FLUSH at the end of fsync The fsync call should be ended after flushing the in-device caches. Reviewed-by: Namjae Jeon Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 269645e23519..ff018a42e435 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -178,6 +179,7 @@ int f2fs_sync_file(struct file *file, loff_t start, loff_t end, int datasync) } filemap_fdatawait_range(sbi->node_inode->i_mapping, 0, LONG_MAX); + ret = blkdev_issue_flush(inode->i_sb->s_bdev, GFP_KERNEL, NULL); } out: mutex_unlock(&inode->i_mutex);