]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
xfs: use xfs_inode_buftarg in xfs_file_dio_aio_write
authorChristoph Hellwig <hch@lst.de>
Fri, 25 Oct 2019 05:25:38 +0000 (22:25 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 28 Oct 2019 15:37:54 +0000 (08:37 -0700)
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>
fs/xfs/xfs_file.c

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