mirror of
https://github.com/torvalds/linux.git
synced 2024-12-29 06:12:08 +00:00
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>
This commit is contained in:
parent
89eb1906a9
commit
b84e772299
@ -1378,10 +1378,9 @@ xfs_vm_bmap(
|
||||
struct address_space *mapping,
|
||||
sector_t block)
|
||||
{
|
||||
struct inode *inode = (struct inode *)mapping->host;
|
||||
struct xfs_inode *ip = XFS_I(inode);
|
||||
struct xfs_inode *ip = XFS_I(mapping->host);
|
||||
|
||||
trace_xfs_vm_bmap(XFS_I(inode));
|
||||
trace_xfs_vm_bmap(ip);
|
||||
|
||||
/*
|
||||
* The swap code (ab-)uses ->bmap to get a block mapping and then
|
||||
@ -1394,9 +1393,7 @@ xfs_vm_bmap(
|
||||
*/
|
||||
if (xfs_is_reflink_inode(ip) || XFS_IS_REALTIME_INODE(ip))
|
||||
return 0;
|
||||
|
||||
filemap_write_and_wait(mapping);
|
||||
return generic_block_bmap(mapping, block, xfs_get_blocks);
|
||||
return iomap_bmap(mapping, block, &xfs_iomap_ops);
|
||||
}
|
||||
|
||||
STATIC int
|
||||
|
Loading…
Reference in New Issue
Block a user