diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-17 18:05:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-17 18:05:23 -0400 |
commit | c2e7b207058d4ff6a9010430763fb561f307eb67 (patch) | |
tree | 8983947c4d62365de3d98113662ff9e643a42a0f /fs/read_write.c | |
parent | c52b76185b7a1b300e5f15ff871c8f45ced3dee9 (diff) | |
parent | 24368aad47dc65b45040d6a31bfd6df1d6f3ec97 (diff) |
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/read_write.c')
-rw-r--r-- | fs/read_write.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/read_write.c b/fs/read_write.c index 69c7c3c2955c..56425cd5c9e7 100644 --- a/fs/read_write.c +++ b/fs/read_write.c | |||
@@ -686,12 +686,16 @@ static ssize_t do_iter_readv_writev(struct file *filp, struct iov_iter *iter, | |||
686 | struct kiocb kiocb; | 686 | struct kiocb kiocb; |
687 | ssize_t ret; | 687 | ssize_t ret; |
688 | 688 | ||
689 | if (flags & ~RWF_HIPRI) | 689 | if (flags & ~(RWF_HIPRI | RWF_DSYNC | RWF_SYNC)) |
690 | return -EOPNOTSUPP; | 690 | return -EOPNOTSUPP; |
691 | 691 | ||
692 | init_sync_kiocb(&kiocb, filp); | 692 | init_sync_kiocb(&kiocb, filp); |
693 | if (flags & RWF_HIPRI) | 693 | if (flags & RWF_HIPRI) |
694 | kiocb.ki_flags |= IOCB_HIPRI; | 694 | kiocb.ki_flags |= IOCB_HIPRI; |
695 | if (flags & RWF_DSYNC) | ||
696 | kiocb.ki_flags |= IOCB_DSYNC; | ||
697 | if (flags & RWF_SYNC) | ||
698 | kiocb.ki_flags |= (IOCB_DSYNC | IOCB_SYNC); | ||
695 | kiocb.ki_pos = *ppos; | 699 | kiocb.ki_pos = *ppos; |
696 | 700 | ||
697 | ret = fn(&kiocb, iter); | 701 | ret = fn(&kiocb, iter); |