xfs_aops.c (a6cbcd4a4a85e2fdb0b3344b88df2e8b3d526b9e) xfs_aops.c (31b140398ce56ab41646eda7f02bcb78d6a4c916)
1/*
2 * Copyright (c) 2000-2005 Silicon Graphics, Inc.
3 * All Rights Reserved.
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation.
8 *

--- 1456 unchanged lines hidden (view full) ---

1465 * don't know whether allocation is necessary or not. Hence we
1466 * can only tell IO completion that one is necessary if we are
1467 * not doing unwritten extent conversion.
1468 */
1469 iocb->private = ioend = xfs_alloc_ioend(inode, XFS_IO_DIRECT);
1470 if (offset + size > XFS_I(inode)->i_d.di_size)
1471 ioend->io_isdirect = 1;
1472
1/*
2 * Copyright (c) 2000-2005 Silicon Graphics, Inc.
3 * All Rights Reserved.
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation.
8 *

--- 1456 unchanged lines hidden (view full) ---

1465 * don't know whether allocation is necessary or not. Hence we
1466 * can only tell IO completion that one is necessary if we are
1467 * not doing unwritten extent conversion.
1468 */
1469 iocb->private = ioend = xfs_alloc_ioend(inode, XFS_IO_DIRECT);
1470 if (offset + size > XFS_I(inode)->i_d.di_size)
1471 ioend->io_isdirect = 1;
1472
1473 ret = __blockdev_direct_IO(rw, iocb, inode, bdev, iter->iov,
1474 offset, iter->nr_segs,
1475 xfs_get_blocks_direct,
1473 ret = __blockdev_direct_IO(rw, iocb, inode, bdev, iter,
1474 offset, xfs_get_blocks_direct,
1476 xfs_end_io_direct_write, NULL,
1477 DIO_ASYNC_EXTEND);
1478 if (ret != -EIOCBQUEUED && iocb->private)
1479 goto out_destroy_ioend;
1480 } else {
1475 xfs_end_io_direct_write, NULL,
1476 DIO_ASYNC_EXTEND);
1477 if (ret != -EIOCBQUEUED && iocb->private)
1478 goto out_destroy_ioend;
1479 } else {
1481 ret = __blockdev_direct_IO(rw, iocb, inode, bdev, iter->iov,
1482 offset, iter->nr_segs,
1483 xfs_get_blocks_direct,
1480 ret = __blockdev_direct_IO(rw, iocb, inode, bdev, iter,
1481 offset, xfs_get_blocks_direct,
1484 NULL, NULL, 0);
1485 }
1486
1487 return ret;
1488
1489out_destroy_ioend:
1490 xfs_destroy_ioend(ioend);
1491 return ret;

--- 244 unchanged lines hidden ---
1482 NULL, NULL, 0);
1483 }
1484
1485 return ret;
1486
1487out_destroy_ioend:
1488 xfs_destroy_ioend(ioend);
1489 return ret;

--- 244 unchanged lines hidden ---