提交 b84e7722 编写于 作者: C Christoph Hellwig 提交者: Darrick J. Wong

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: NChristoph Hellwig <hch@lst.de>
Reviewed-by: NDave Chinner <dchinner@redhat.com>
Reviewed-by: NDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
上级 89eb1906
...@@ -1378,10 +1378,9 @@ xfs_vm_bmap( ...@@ -1378,10 +1378,9 @@ xfs_vm_bmap(
struct address_space *mapping, struct address_space *mapping,
sector_t block) sector_t block)
{ {
struct inode *inode = (struct inode *)mapping->host; struct xfs_inode *ip = XFS_I(mapping->host);
struct xfs_inode *ip = XFS_I(inode);
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 * The swap code (ab-)uses ->bmap to get a block mapping and then
...@@ -1394,9 +1393,7 @@ xfs_vm_bmap( ...@@ -1394,9 +1393,7 @@ xfs_vm_bmap(
*/ */
if (xfs_is_reflink_inode(ip) || XFS_IS_REALTIME_INODE(ip)) if (xfs_is_reflink_inode(ip) || XFS_IS_REALTIME_INODE(ip))
return 0; return 0;
return iomap_bmap(mapping, block, &xfs_iomap_ops);
filemap_write_and_wait(mapping);
return generic_block_bmap(mapping, block, xfs_get_blocks);
} }
STATIC int STATIC int
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册