xfs: add struct xfs_mount pointer to struct xfs_buf
We need to derive the mount pointer from a buffer in a lot of place. Add a direct pointer to short cut the pointer chasing. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
This commit is contained in:

committed by
Darrick J. Wong

parent
8124b9b601
commit
dbd329f1e4
@@ -276,7 +276,7 @@ xfs_btree_lblock_calc_crc(
|
||||
struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp);
|
||||
struct xfs_buf_log_item *bip = bp->b_log_item;
|
||||
|
||||
if (!xfs_sb_version_hascrc(&bp->b_target->bt_mount->m_sb))
|
||||
if (!xfs_sb_version_hascrc(&bp->b_mount->m_sb))
|
||||
return;
|
||||
if (bip)
|
||||
block->bb_u.l.bb_lsn = cpu_to_be64(bip->bli_item.li_lsn);
|
||||
@@ -288,7 +288,7 @@ xfs_btree_lblock_verify_crc(
|
||||
struct xfs_buf *bp)
|
||||
{
|
||||
struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp);
|
||||
struct xfs_mount *mp = bp->b_target->bt_mount;
|
||||
struct xfs_mount *mp = bp->b_mount;
|
||||
|
||||
if (xfs_sb_version_hascrc(&mp->m_sb)) {
|
||||
if (!xfs_log_check_lsn(mp, be64_to_cpu(block->bb_u.l.bb_lsn)))
|
||||
@@ -314,7 +314,7 @@ xfs_btree_sblock_calc_crc(
|
||||
struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp);
|
||||
struct xfs_buf_log_item *bip = bp->b_log_item;
|
||||
|
||||
if (!xfs_sb_version_hascrc(&bp->b_target->bt_mount->m_sb))
|
||||
if (!xfs_sb_version_hascrc(&bp->b_mount->m_sb))
|
||||
return;
|
||||
if (bip)
|
||||
block->bb_u.s.bb_lsn = cpu_to_be64(bip->bli_item.li_lsn);
|
||||
@@ -326,7 +326,7 @@ xfs_btree_sblock_verify_crc(
|
||||
struct xfs_buf *bp)
|
||||
{
|
||||
struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp);
|
||||
struct xfs_mount *mp = bp->b_target->bt_mount;
|
||||
struct xfs_mount *mp = bp->b_mount;
|
||||
|
||||
if (xfs_sb_version_hascrc(&mp->m_sb)) {
|
||||
if (!xfs_log_check_lsn(mp, be64_to_cpu(block->bb_u.s.bb_lsn)))
|
||||
@@ -4425,7 +4425,7 @@ xfs_btree_lblock_v5hdr_verify(
|
||||
struct xfs_buf *bp,
|
||||
uint64_t owner)
|
||||
{
|
||||
struct xfs_mount *mp = bp->b_target->bt_mount;
|
||||
struct xfs_mount *mp = bp->b_mount;
|
||||
struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp);
|
||||
|
||||
if (!xfs_sb_version_hascrc(&mp->m_sb))
|
||||
@@ -4446,7 +4446,7 @@ xfs_btree_lblock_verify(
|
||||
struct xfs_buf *bp,
|
||||
unsigned int max_recs)
|
||||
{
|
||||
struct xfs_mount *mp = bp->b_target->bt_mount;
|
||||
struct xfs_mount *mp = bp->b_mount;
|
||||
struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp);
|
||||
|
||||
/* numrecs verification */
|
||||
@@ -4476,7 +4476,7 @@ xfs_failaddr_t
|
||||
xfs_btree_sblock_v5hdr_verify(
|
||||
struct xfs_buf *bp)
|
||||
{
|
||||
struct xfs_mount *mp = bp->b_target->bt_mount;
|
||||
struct xfs_mount *mp = bp->b_mount;
|
||||
struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp);
|
||||
struct xfs_perag *pag = bp->b_pag;
|
||||
|
||||
@@ -4502,7 +4502,7 @@ xfs_btree_sblock_verify(
|
||||
struct xfs_buf *bp,
|
||||
unsigned int max_recs)
|
||||
{
|
||||
struct xfs_mount *mp = bp->b_target->bt_mount;
|
||||
struct xfs_mount *mp = bp->b_mount;
|
||||
struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp);
|
||||
xfs_agblock_t agno;
|
||||
|
||||
|
Reference in New Issue
Block a user