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/affs | |
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/affs')
-rw-r--r-- | fs/affs/file.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/affs/file.c b/fs/affs/file.c index 0cde550050e8..0deec9cc2362 100644 --- a/fs/affs/file.c +++ b/fs/affs/file.c | |||
@@ -389,12 +389,13 @@ static void affs_write_failed(struct address_space *mapping, loff_t to) | |||
389 | } | 389 | } |
390 | 390 | ||
391 | static ssize_t | 391 | static ssize_t |
392 | affs_direct_IO(struct kiocb *iocb, struct iov_iter *iter, loff_t offset) | 392 | affs_direct_IO(struct kiocb *iocb, struct iov_iter *iter) |
393 | { | 393 | { |
394 | struct file *file = iocb->ki_filp; | 394 | struct file *file = iocb->ki_filp; |
395 | struct address_space *mapping = file->f_mapping; | 395 | struct address_space *mapping = file->f_mapping; |
396 | struct inode *inode = mapping->host; | 396 | struct inode *inode = mapping->host; |
397 | size_t count = iov_iter_count(iter); | 397 | size_t count = iov_iter_count(iter); |
398 | loff_t offset = iocb->ki_pos; | ||
398 | ssize_t ret; | 399 | ssize_t ret; |
399 | 400 | ||
400 | if (iov_iter_rw(iter) == WRITE) { | 401 | if (iov_iter_rw(iter) == WRITE) { |
@@ -404,7 +405,7 @@ affs_direct_IO(struct kiocb *iocb, struct iov_iter *iter, loff_t offset) | |||
404 | return 0; | 405 | return 0; |
405 | } | 406 | } |
406 | 407 | ||
407 | ret = blockdev_direct_IO(iocb, inode, iter, offset, affs_get_block); | 408 | ret = blockdev_direct_IO(iocb, inode, iter, affs_get_block); |
408 | if (ret < 0 && iov_iter_rw(iter) == WRITE) | 409 | if (ret < 0 && iov_iter_rw(iter) == WRITE) |
409 | affs_write_failed(mapping, offset + count); | 410 | affs_write_failed(mapping, offset + count); |
410 | return ret; | 411 | return ret; |