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/ext2 | |
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/ext2')
-rw-r--r-- | fs/ext2/inode.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c index 6bd58e6ff038..b675610391b8 100644 --- a/fs/ext2/inode.c +++ b/fs/ext2/inode.c | |||
@@ -854,20 +854,20 @@ static sector_t ext2_bmap(struct address_space *mapping, sector_t block) | |||
854 | } | 854 | } |
855 | 855 | ||
856 | static ssize_t | 856 | static ssize_t |
857 | ext2_direct_IO(struct kiocb *iocb, struct iov_iter *iter, loff_t offset) | 857 | ext2_direct_IO(struct kiocb *iocb, struct iov_iter *iter) |
858 | { | 858 | { |
859 | struct file *file = iocb->ki_filp; | 859 | struct file *file = iocb->ki_filp; |
860 | struct address_space *mapping = file->f_mapping; | 860 | struct address_space *mapping = file->f_mapping; |
861 | struct inode *inode = mapping->host; | 861 | struct inode *inode = mapping->host; |
862 | size_t count = iov_iter_count(iter); | 862 | size_t count = iov_iter_count(iter); |
863 | loff_t offset = iocb->ki_pos; | ||
863 | ssize_t ret; | 864 | ssize_t ret; |
864 | 865 | ||
865 | if (IS_DAX(inode)) | 866 | if (IS_DAX(inode)) |
866 | ret = dax_do_io(iocb, inode, iter, offset, ext2_get_block, NULL, | 867 | ret = dax_do_io(iocb, inode, iter, ext2_get_block, NULL, |
867 | DIO_LOCKING); | 868 | DIO_LOCKING); |
868 | else | 869 | else |
869 | ret = blockdev_direct_IO(iocb, inode, iter, offset, | 870 | ret = blockdev_direct_IO(iocb, inode, iter, ext2_get_block); |
870 | ext2_get_block); | ||
871 | if (ret < 0 && iov_iter_rw(iter) == WRITE) | 871 | if (ret < 0 && iov_iter_rw(iter) == WRITE) |
872 | ext2_write_failed(mapping, offset + count); | 872 | ext2_write_failed(mapping, offset + count); |
873 | return ret; | 873 | return ret; |