aboutsummaryrefslogtreecommitdiffstats
path: root/fs/affs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2016-04-07 11:51:58 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2016-05-01 19:58:39 -0400
commitc8b8e32d700fe943a935e435ae251364d016c497 (patch)
tree956e582a123c6b2761e80901bdaaedc5ba4137e3 /fs/affs
parent13712713caba0c1b8c2c0070a4c1f4487def8dee (diff)
direct-io: eliminate the offset argument to ->direct_IO
Including blkdev_direct_IO and dax_do_io. It has to be ki_pos to actually work, so eliminate the superflous argument. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/affs')
-rw-r--r--fs/affs/file.c5
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
391static ssize_t 391static ssize_t
392affs_direct_IO(struct kiocb *iocb, struct iov_iter *iter, loff_t offset) 392affs_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;