aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_aops.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_aops.c')
-rw-r--r--fs/xfs/xfs_aops.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c
index 0479c32c5eb1..330d7b1c4be3 100644
--- a/fs/xfs/xfs_aops.c
+++ b/fs/xfs/xfs_aops.c
@@ -1449,9 +1449,8 @@ STATIC ssize_t
1449xfs_vm_direct_IO( 1449xfs_vm_direct_IO(
1450 int rw, 1450 int rw,
1451 struct kiocb *iocb, 1451 struct kiocb *iocb,
1452 const struct iovec *iov, 1452 struct iov_iter *iter,
1453 loff_t offset, 1453 loff_t offset)
1454 unsigned long nr_segs)
1455{ 1454{
1456 struct inode *inode = iocb->ki_filp->f_mapping->host; 1455 struct inode *inode = iocb->ki_filp->f_mapping->host;
1457 struct block_device *bdev = xfs_find_bdev_for_inode(inode); 1456 struct block_device *bdev = xfs_find_bdev_for_inode(inode);
@@ -1459,7 +1458,7 @@ xfs_vm_direct_IO(
1459 ssize_t ret; 1458 ssize_t ret;
1460 1459
1461 if (rw & WRITE) { 1460 if (rw & WRITE) {
1462 size_t size = iov_length(iov, nr_segs); 1461 size_t size = iov_length(iter->iov, iter->nr_segs);
1463 1462
1464 /* 1463 /*
1465 * We cannot preallocate a size update transaction here as we 1464 * We cannot preallocate a size update transaction here as we
@@ -1471,16 +1470,16 @@ xfs_vm_direct_IO(
1471 if (offset + size > XFS_I(inode)->i_d.di_size) 1470 if (offset + size > XFS_I(inode)->i_d.di_size)
1472 ioend->io_isdirect = 1; 1471 ioend->io_isdirect = 1;
1473 1472
1474 ret = __blockdev_direct_IO(rw, iocb, inode, bdev, iov, 1473 ret = __blockdev_direct_IO(rw, iocb, inode, bdev, iter->iov,
1475 offset, nr_segs, 1474 offset, iter->nr_segs,
1476 xfs_get_blocks_direct, 1475 xfs_get_blocks_direct,
1477 xfs_end_io_direct_write, NULL, 1476 xfs_end_io_direct_write, NULL,
1478 DIO_ASYNC_EXTEND); 1477 DIO_ASYNC_EXTEND);
1479 if (ret != -EIOCBQUEUED && iocb->private) 1478 if (ret != -EIOCBQUEUED && iocb->private)
1480 goto out_destroy_ioend; 1479 goto out_destroy_ioend;
1481 } else { 1480 } else {
1482 ret = __blockdev_direct_IO(rw, iocb, inode, bdev, iov, 1481 ret = __blockdev_direct_IO(rw, iocb, inode, bdev, iter->iov,
1483 offset, nr_segs, 1482 offset, iter->nr_segs,
1484 xfs_get_blocks_direct, 1483 xfs_get_blocks_direct,
1485 NULL, NULL, 0); 1484 NULL, NULL, 0);
1486 } 1485 }