diff options
author | Christoph Hellwig <hch@lst.de> | 2016-04-07 17:51:58 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-05-02 01:58:39 +0200 |
commit | c8b8e32d700fe943a935e435ae251364d016c497 (patch) | |
tree | 956e582a123c6b2761e80901bdaaedc5ba4137e3 /mm | |
parent | xfs: eliminate the pos variable in xfs_file_dio_aio_write (diff) | |
download | linux-c8b8e32d700fe943a935e435ae251364d016c497.tar.xz linux-c8b8e32d700fe943a935e435ae251364d016c497.zip |
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 'mm')
-rw-r--r-- | mm/filemap.c | 5 | ||||
-rw-r--r-- | mm/page_io.c | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index e7108c31346d..cb36db9f4107 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1853,8 +1853,7 @@ generic_file_read_iter(struct kiocb *iocb, struct iov_iter *iter) iocb->ki_pos + count - 1); if (!retval) { struct iov_iter data = *iter; - retval = mapping->a_ops->direct_IO(iocb, &data, - iocb->ki_pos); + retval = mapping->a_ops->direct_IO(iocb, &data); } if (retval > 0) { @@ -2538,7 +2537,7 @@ generic_file_direct_write(struct kiocb *iocb, struct iov_iter *from) } data = *from; - written = mapping->a_ops->direct_IO(iocb, &data, pos); + written = mapping->a_ops->direct_IO(iocb, &data); /* * Finally, try again to invalidate clean pages which might have been diff --git a/mm/page_io.c b/mm/page_io.c index cd92e3d67a32..89275601d399 100644 --- a/mm/page_io.c +++ b/mm/page_io.c @@ -279,7 +279,7 @@ int __swap_writepage(struct page *page, struct writeback_control *wbc, set_page_writeback(page); unlock_page(page); - ret = mapping->a_ops->direct_IO(&kiocb, &from, kiocb.ki_pos); + ret = mapping->a_ops->direct_IO(&kiocb, &from); if (ret == PAGE_SIZE) { count_vm_event(PSWPOUT); ret = 0; |