xfs: introduce xfs_buf_daddr()
authorDave Chinner <dchinner@redhat.com>
Thu, 19 Aug 2021 01:46:57 +0000 (18:46 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 19 Aug 2021 17:07:14 +0000 (10:07 -0700)
commit04fcad80cd068731a779fb442f78234732683755
tree2570c3f19aba64a2d359769ba1920801f9d5cb9f
parentcf28e17c9186c83e7e8702f844bc40b6e782ce6c
xfs: introduce xfs_buf_daddr()

Introduce a helper function xfs_buf_daddr() to extract the disk
address of the buffer from the struct xfs_buf. This will replace
direct accesses to bp->b_bn and bp->b_maps[0].bm_bn, as well as
the XFS_BUF_ADDR() macro.

This patch introduces the helper function and replaces all uses of
XFS_BUF_ADDR() as this is just a simple sed replacement.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
15 files changed:
fs/xfs/libxfs/xfs_alloc_btree.c
fs/xfs/libxfs/xfs_attr.c
fs/xfs/libxfs/xfs_bmap.c
fs/xfs/libxfs/xfs_bmap_btree.c
fs/xfs/libxfs/xfs_btree.c
fs/xfs/libxfs/xfs_ialloc_btree.c
fs/xfs/libxfs/xfs_inode_buf.c
fs/xfs/libxfs/xfs_refcount_btree.c
fs/xfs/libxfs/xfs_rmap_btree.c
fs/xfs/libxfs/xfs_sb.c
fs/xfs/scrub/btree.c
fs/xfs/xfs_attr_inactive.c
fs/xfs/xfs_buf.c
fs/xfs/xfs_buf.h
fs/xfs/xfs_trans_buf.c