aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-06-01 12:03:09 -0400
committerDarrick J. Wong <darrick.wong@oracle.com>2018-06-01 21:37:33 -0400
commitb84e772299dc5b9da22a40ba87ed519a891397a3 (patch)
treed652d855a2bdc22efee15e01e5705058813a2498
parent89eb1906a9530ef694b2a5817c9498997722754f (diff)
xfs: use iomap_bmap
Switch to the iomap based bmap implementation to get rid of one of the last users of xfs_get_blocks. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-rw-r--r--fs/xfs/xfs_aops.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c
index 80de476cecf8..56e405572909 100644
--- a/fs/xfs/xfs_aops.c
+++ b/fs/xfs/xfs_aops.c
@@ -1378,10 +1378,9 @@ xfs_vm_bmap(
1378 struct address_space *mapping, 1378 struct address_space *mapping,
1379 sector_t block) 1379 sector_t block)
1380{ 1380{
1381 struct inode *inode = (struct inode *)mapping->host; 1381 struct xfs_inode *ip = XFS_I(mapping->host);
1382 struct xfs_inode *ip = XFS_I(inode);
1383 1382
1384 trace_xfs_vm_bmap(XFS_I(inode)); 1383 trace_xfs_vm_bmap(ip);
1385 1384
1386 /* 1385 /*
1387 * The swap code (ab-)uses ->bmap to get a block mapping and then 1386 * The swap code (ab-)uses ->bmap to get a block mapping and then
@@ -1394,9 +1393,7 @@ xfs_vm_bmap(
1394 */ 1393 */
1395 if (xfs_is_reflink_inode(ip) || XFS_IS_REALTIME_INODE(ip)) 1394 if (xfs_is_reflink_inode(ip) || XFS_IS_REALTIME_INODE(ip))
1396 return 0; 1395 return 0;
1397 1396 return iomap_bmap(mapping, block, &xfs_iomap_ops);
1398 filemap_write_and_wait(mapping);
1399 return generic_block_bmap(mapping, block, xfs_get_blocks);
1400} 1397}
1401 1398
1402STATIC int 1399STATIC int