diff options
author | Christoph Hellwig <hch@lst.de> | 2016-04-07 11:51:58 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-05-01 19:58:39 -0400 |
commit | c8b8e32d700fe943a935e435ae251364d016c497 (patch) | |
tree | 956e582a123c6b2761e80901bdaaedc5ba4137e3 /fs/reiserfs/inode.c | |
parent | 13712713caba0c1b8c2c0070a4c1f4487def8dee (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/reiserfs/inode.c')
-rw-r--r-- | fs/reiserfs/inode.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index d5c2e9c865de..825455d3e4ba 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c | |||
@@ -3279,15 +3279,14 @@ static int reiserfs_releasepage(struct page *page, gfp_t unused_gfp_flags) | |||
3279 | * We thank Mingming Cao for helping us understand in great detail what | 3279 | * We thank Mingming Cao for helping us understand in great detail what |
3280 | * to do in this section of the code. | 3280 | * to do in this section of the code. |
3281 | */ | 3281 | */ |
3282 | static ssize_t reiserfs_direct_IO(struct kiocb *iocb, struct iov_iter *iter, | 3282 | static ssize_t reiserfs_direct_IO(struct kiocb *iocb, struct iov_iter *iter) |
3283 | loff_t offset) | ||
3284 | { | 3283 | { |
3285 | struct file *file = iocb->ki_filp; | 3284 | struct file *file = iocb->ki_filp; |
3286 | struct inode *inode = file->f_mapping->host; | 3285 | struct inode *inode = file->f_mapping->host; |
3287 | size_t count = iov_iter_count(iter); | 3286 | size_t count = iov_iter_count(iter); |
3288 | ssize_t ret; | 3287 | ssize_t ret; |
3289 | 3288 | ||
3290 | ret = blockdev_direct_IO(iocb, inode, iter, offset, | 3289 | ret = blockdev_direct_IO(iocb, inode, iter, |
3291 | reiserfs_get_blocks_direct_io); | 3290 | reiserfs_get_blocks_direct_io); |
3292 | 3291 | ||
3293 | /* | 3292 | /* |
@@ -3296,7 +3295,7 @@ static ssize_t reiserfs_direct_IO(struct kiocb *iocb, struct iov_iter *iter, | |||
3296 | */ | 3295 | */ |
3297 | if (unlikely(iov_iter_rw(iter) == WRITE && ret < 0)) { | 3296 | if (unlikely(iov_iter_rw(iter) == WRITE && ret < 0)) { |
3298 | loff_t isize = i_size_read(inode); | 3297 | loff_t isize = i_size_read(inode); |
3299 | loff_t end = offset + count; | 3298 | loff_t end = iocb->ki_pos + count; |
3300 | 3299 | ||
3301 | if ((end > isize) && inode_newsize_ok(inode, isize) == 0) { | 3300 | if ((end > isize) && inode_newsize_ok(inode, isize) == 0) { |
3302 | truncate_setsize(inode, isize); | 3301 | truncate_setsize(inode, isize); |