Skip to content

Commit b84e772

Browse files
Christoph Hellwigdjwong
authored andcommitted
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>
1 parent 89eb190 commit b84e772

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

‎fs/xfs/xfs_aops.c‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1378,10 +1378,9 @@ xfs_vm_bmap(
13781378
struct address_space *mapping,
13791379
sector_t block)
13801380
{
1381-
struct inode *inode = (struct inode *)mapping->host;
1382-
struct xfs_inode *ip = XFS_I(inode);
1381+
struct xfs_inode *ip = XFS_I(mapping->host);
13831382

1384-
trace_xfs_vm_bmap(XFS_I(inode));
1383+
trace_xfs_vm_bmap(ip);
13851384

13861385
/*
13871386
* The swap code (ab-)uses ->bmap to get a block mapping and then
@@ -1394,9 +1393,7 @@ xfs_vm_bmap(
13941393
*/
13951394
if (xfs_is_reflink_inode(ip) || XFS_IS_REALTIME_INODE(ip))
13961395
return 0;
1397-
1398-
filemap_write_and_wait(mapping);
1399-
return generic_block_bmap(mapping, block, xfs_get_blocks);
1396+
return iomap_bmap(mapping, block, &xfs_iomap_ops);
14001397
}
14011398

14021399
STATIC int

0 commit comments

Comments
 (0)