summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/file.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-05-17 15:05:23 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-05-17 15:05:23 -0700
commitc2e7b207058d4ff6a9010430763fb561f307eb67 (patch)
tree8983947c4d62365de3d98113662ff9e643a42a0f /fs/gfs2/file.c
parentc52b76185b7a1b300e5f15ff871c8f45ced3dee9 (diff)
parent24368aad47dc65b45040d6a31bfd6df1d6f3ec97 (diff)
downloadlinux-c2e7b207058d4ff6a9010430763fb561f307eb67.tar.bz2
Merge branch 'work.preadv2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs cleanups from Al Viro: "More cleanups from Christoph" * 'work.preadv2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: nfsd: use RWF_SYNC fs: add RWF_DSYNC aand RWF_SYNC ceph: use generic_write_sync fs: simplify the generic_write_sync prototype fs: add IOCB_SYNC and IOCB_DSYNC direct-io: remove the offset argument to dio_complete direct-io: eliminate the offset argument to ->direct_IO xfs: eliminate the pos variable in xfs_file_dio_aio_write filemap: remove the pos argument to generic_file_direct_write filemap: remove pos variables in generic_file_read_iter
Diffstat (limited to 'fs/gfs2/file.c')
-rw-r--r--fs/gfs2/file.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
index a3e7358e3cd1..e53b723abd3b 100644
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
@@ -895,7 +895,10 @@ static long __gfs2_fallocate(struct file *file, int mode, loff_t offset, loff_t
mark_inode_dirty(inode);
}
- return generic_write_sync(file, pos, count);
+ if ((file->f_flags & O_DSYNC) || IS_SYNC(file->f_mapping->host))
+ return vfs_fsync_range(file, pos, pos + count - 1,
+ (file->f_flags & __O_SYNC) ? 0 : 1);
+ return 0;
out_trans_fail:
gfs2_inplace_release(ip);