xfs: use xfs_inode_buftarg in xfs_file_dio_aio_write

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
This commit is contained in:
Christoph Hellwig 2019-10-24 22:25:38 -07:00 committed by Darrick J. Wong
parent 30fa529e3b
commit f9acc19c8c

View File

@ -487,8 +487,7 @@ xfs_file_dio_aio_write(
int unaligned_io = 0; int unaligned_io = 0;
int iolock; int iolock;
size_t count = iov_iter_count(from); size_t count = iov_iter_count(from);
struct xfs_buftarg *target = XFS_IS_REALTIME_INODE(ip) ? struct xfs_buftarg *target = xfs_inode_buftarg(ip);
mp->m_rtdev_targp : mp->m_ddev_targp;
/* DIO must be aligned to device logical sector size */ /* DIO must be aligned to device logical sector size */
if ((iocb->ki_pos | count) & target->bt_logical_sectormask) if ((iocb->ki_pos | count) & target->bt_logical_sectormask)