]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: add struct xfs_mount pointer to struct xfs_buf
authorChristoph Hellwig <hch@lst.de>
Wed, 28 Aug 2019 16:08:08 +0000 (12:08 -0400)
committerEric Sandeen <sandeen@redhat.com>
Wed, 28 Aug 2019 16:08:08 +0000 (12:08 -0400)
Source kernel commit: dbd329f1e44ed48de8a1c19da5eb1218f5e1b4a5

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>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
21 files changed:
libxfs/libxfs_io.h
libxfs/rdwr.c
libxfs/xfs_alloc.c
libxfs/xfs_alloc_btree.c
libxfs/xfs_attr_leaf.c
libxfs/xfs_attr_remote.c
libxfs/xfs_bmap_btree.c
libxfs/xfs_btree.c
libxfs/xfs_da_btree.c
libxfs/xfs_dir2_block.c
libxfs/xfs_dir2_data.c
libxfs/xfs_dir2_leaf.c
libxfs/xfs_dir2_node.c
libxfs/xfs_dquot_buf.c
libxfs/xfs_ialloc.c
libxfs/xfs_ialloc_btree.c
libxfs/xfs_inode_buf.c
libxfs/xfs_refcount_btree.c
libxfs/xfs_rmap_btree.c
libxfs/xfs_sb.c
libxfs/xfs_symlink_remote.c

index a8d9584aac56fcd89f22f8f3f70a3d40d0a2393b..0b8d977451025506c9cb5fbc921336bbd938cf9f 100644 (file)
@@ -67,6 +67,7 @@ typedef struct xfs_buf {
        int                     b_error;
        const struct xfs_buf_ops *b_ops;
        struct xfs_perag        *b_pag;
+       struct xfs_mount        *b_mount;
        struct xfs_buf_map      *b_maps;
        struct xfs_buf_map      __b_map;
        int                     b_nmaps;
index 998862afa99570b6dc9dc2cc30106e99edfd9fcf..1f2c129b7be14a6fc90c49dcb8e37e5ca86813a4 100644 (file)
@@ -553,6 +553,7 @@ __initbuf(xfs_buf_t *bp, struct xfs_buftarg *btp, xfs_daddr_t bno,
        bp->b_bcount = bytes;
        bp->b_length = BTOBB(bytes);
        bp->b_target = btp;
+       bp->b_mount = btp->bt_mount;
        bp->b_error = 0;
        if (!bp->b_addr)
                bp->b_addr = memalign(libxfs_device_alignment(), bytes);
@@ -1334,7 +1335,7 @@ xfs_verify_magic(
        struct xfs_buf          *bp,
        __be32                  dmagic)
 {
-       struct xfs_mount        *mp = bp->b_target->bt_mount;
+       struct xfs_mount        *mp = bp->b_mount;
        int                     idx;
 
        idx = xfs_sb_version_hascrc(&mp->m_sb);
@@ -1353,7 +1354,7 @@ xfs_verify_magic16(
        struct xfs_buf          *bp,
        __be16                  dmagic)
 {
-       struct xfs_mount        *mp = bp->b_target->bt_mount;
+       struct xfs_mount        *mp = bp->b_mount;
        int                     idx;
 
        idx = xfs_sb_version_hascrc(&mp->m_sb);
index 2376c7e60227470f9bb21cd0dc776eb0bfbf1247..f9edb07542c2909524c2e3136a6ea6e3035abac5 100644 (file)
@@ -551,7 +551,7 @@ static xfs_failaddr_t
 xfs_agfl_verify(
        struct xfs_buf  *bp)
 {
-       struct xfs_mount *mp = bp->b_target->bt_mount;
+       struct xfs_mount *mp = bp->b_mount;
        struct xfs_agfl *agfl = XFS_BUF_TO_AGFL(bp);
        int             i;
 
@@ -592,7 +592,7 @@ static void
 xfs_agfl_read_verify(
        struct xfs_buf  *bp)
 {
-       struct xfs_mount *mp = bp->b_target->bt_mount;
+       struct xfs_mount *mp = bp->b_mount;
        xfs_failaddr_t  fa;
 
        /*
@@ -617,7 +617,7 @@ static void
 xfs_agfl_write_verify(
        struct xfs_buf  *bp)
 {
-       struct xfs_mount        *mp = bp->b_target->bt_mount;
+       struct xfs_mount        *mp = bp->b_mount;
        struct xfs_buf_log_item *bip = bp->b_log_item;
        xfs_failaddr_t          fa;
 
@@ -2582,7 +2582,7 @@ static xfs_failaddr_t
 xfs_agf_verify(
        struct xfs_buf          *bp)
 {
-       struct xfs_mount        *mp = bp->b_target->bt_mount;
+       struct xfs_mount        *mp = bp->b_mount;
        struct xfs_agf          *agf = XFS_BUF_TO_AGF(bp);
 
        if (xfs_sb_version_hascrc(&mp->m_sb)) {
@@ -2640,7 +2640,7 @@ static void
 xfs_agf_read_verify(
        struct xfs_buf  *bp)
 {
-       struct xfs_mount *mp = bp->b_target->bt_mount;
+       struct xfs_mount *mp = bp->b_mount;
        xfs_failaddr_t  fa;
 
        if (xfs_sb_version_hascrc(&mp->m_sb) &&
@@ -2657,7 +2657,7 @@ static void
 xfs_agf_write_verify(
        struct xfs_buf  *bp)
 {
-       struct xfs_mount        *mp = bp->b_target->bt_mount;
+       struct xfs_mount        *mp = bp->b_mount;
        struct xfs_buf_log_item *bip = bp->b_log_item;
        xfs_failaddr_t          fa;
 
index 5fa3c63f7a3676db35db3fcbe6f48f074fe150cc..37b1ec1d2ca5668c3aa309ae11729f43eb71a1af 100644 (file)
@@ -290,7 +290,7 @@ static xfs_failaddr_t
 xfs_allocbt_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;
        xfs_failaddr_t          fa;
index 1027ca010216feb146d7aca38d5d124acfbcd6cf..09a5a37346c88b20f64ebca881502ef363e37ec3 100644 (file)
@@ -236,7 +236,7 @@ xfs_attr3_leaf_verify(
        struct xfs_buf                  *bp)
 {
        struct xfs_attr3_icleaf_hdr     ichdr;
-       struct xfs_mount                *mp = bp->b_target->bt_mount;
+       struct xfs_mount                *mp = bp->b_mount;
        struct xfs_attr_leafblock       *leaf = bp->b_addr;
        struct xfs_attr_leaf_entry      *entries;
        uint32_t                        end;    /* must be 32bit - see below */
@@ -309,7 +309,7 @@ static void
 xfs_attr3_leaf_write_verify(
        struct xfs_buf  *bp)
 {
-       struct xfs_mount        *mp = bp->b_target->bt_mount;
+       struct xfs_mount        *mp = bp->b_mount;
        struct xfs_buf_log_item *bip = bp->b_log_item;
        struct xfs_attr3_leaf_hdr *hdr3 = bp->b_addr;
        xfs_failaddr_t          fa;
@@ -339,7 +339,7 @@ static void
 xfs_attr3_leaf_read_verify(
        struct xfs_buf          *bp)
 {
-       struct xfs_mount        *mp = bp->b_target->bt_mount;
+       struct xfs_mount        *mp = bp->b_mount;
        xfs_failaddr_t          fa;
 
        if (xfs_sb_version_hascrc(&mp->m_sb) &&
@@ -861,7 +861,7 @@ xfs_attr_shortform_allfit(
        struct xfs_attr3_icleaf_hdr leafhdr;
        int                     bytes;
        int                     i;
-       struct xfs_mount        *mp = bp->b_target->bt_mount;
+       struct xfs_mount        *mp = bp->b_mount;
 
        leaf = bp->b_addr;
        xfs_attr3_leaf_hdr_from_disk(mp->m_attr_geo, &leafhdr, leaf);
@@ -1521,7 +1521,7 @@ xfs_attr_leaf_order(
 {
        struct xfs_attr3_icleaf_hdr ichdr1;
        struct xfs_attr3_icleaf_hdr ichdr2;
-       struct xfs_mount *mp = leaf1_bp->b_target->bt_mount;
+       struct xfs_mount *mp = leaf1_bp->b_mount;
 
        xfs_attr3_leaf_hdr_from_disk(mp->m_attr_geo, &ichdr1, leaf1_bp->b_addr);
        xfs_attr3_leaf_hdr_from_disk(mp->m_attr_geo, &ichdr2, leaf2_bp->b_addr);
@@ -2564,7 +2564,7 @@ xfs_attr_leaf_lasthash(
 {
        struct xfs_attr3_icleaf_hdr ichdr;
        struct xfs_attr_leaf_entry *entries;
-       struct xfs_mount *mp = bp->b_target->bt_mount;
+       struct xfs_mount *mp = bp->b_mount;
 
        xfs_attr3_leaf_hdr_from_disk(mp->m_attr_geo, &ichdr, bp->b_addr);
        entries = xfs_attr3_leaf_entryp(bp->b_addr);
index e9c8efd6bb1e8eee7334ea743eb6f1bbb6e58e30..52a77d7d3f8e9f18dbdfdb5617045101d478c603 100644 (file)
@@ -106,7 +106,7 @@ __xfs_attr3_rmt_read_verify(
        bool            check_crc,
        xfs_failaddr_t  *failaddr)
 {
-       struct xfs_mount *mp = bp->b_target->bt_mount;
+       struct xfs_mount *mp = bp->b_mount;
        char            *ptr;
        int             len;
        xfs_daddr_t     bno;
@@ -170,7 +170,7 @@ static void
 xfs_attr3_rmt_write_verify(
        struct xfs_buf  *bp)
 {
-       struct xfs_mount *mp = bp->b_target->bt_mount;
+       struct xfs_mount *mp = bp->b_mount;
        xfs_failaddr_t  fa;
        int             blksize = mp->m_attr_geo->blksize;
        char            *ptr;
index b16f90199b41f4bca607a38ecc8e1fee87adc231..24120330c930ff73b9913e2a0fbb7b315fb226e8 100644 (file)
@@ -408,7 +408,7 @@ static xfs_failaddr_t
 xfs_bmbt_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);
        xfs_failaddr_t          fa;
        unsigned int            level;
index 9459c717ce756584e5c672e59ddc148c6d4d9b3c..bcfd8fefbbd80e7ae181c61661fde497db969fac 100644 (file)
@@ -272,7 +272,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);
@@ -284,7 +284,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)))
@@ -310,7 +310,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);
@@ -322,7 +322,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;
 
index 87b2bc37dfd5dc30660ab6b42cce97ee354acb4a..6d05c9b7015e462801f1ed92ddeef3507f50ce11 100644 (file)
@@ -121,7 +121,7 @@ xfs_da3_blkinfo_verify(
        struct xfs_buf          *bp,
        struct xfs_da3_blkinfo  *hdr3)
 {
-       struct xfs_mount        *mp = bp->b_target->bt_mount;
+       struct xfs_mount        *mp = bp->b_mount;
        struct xfs_da_blkinfo   *hdr = &hdr3->hdr;
 
        if (!xfs_verify_magic16(bp, hdr->magic))
@@ -143,7 +143,7 @@ static xfs_failaddr_t
 xfs_da3_node_verify(
        struct xfs_buf          *bp)
 {
-       struct xfs_mount        *mp = bp->b_target->bt_mount;
+       struct xfs_mount        *mp = bp->b_mount;
        struct xfs_da_intnode   *hdr = bp->b_addr;
        struct xfs_da3_icnode_hdr ichdr;
        const struct xfs_dir_ops *ops;
@@ -181,7 +181,7 @@ static void
 xfs_da3_node_write_verify(
        struct xfs_buf  *bp)
 {
-       struct xfs_mount        *mp = bp->b_target->bt_mount;
+       struct xfs_mount        *mp = bp->b_mount;
        struct xfs_buf_log_item *bip = bp->b_log_item;
        struct xfs_da3_node_hdr *hdr3 = bp->b_addr;
        xfs_failaddr_t          fa;
index 3c248510cc660bbeb644be7960e5dea93b929019..72894c1cd6f242191afefc832452833d5d4ec2da 100644 (file)
@@ -47,7 +47,7 @@ static xfs_failaddr_t
 xfs_dir3_block_verify(
        struct xfs_buf          *bp)
 {
-       struct xfs_mount        *mp = bp->b_target->bt_mount;
+       struct xfs_mount        *mp = bp->b_mount;
        struct xfs_dir3_blk_hdr *hdr3 = bp->b_addr;
 
        if (!xfs_verify_magic(bp, hdr3->magic))
@@ -68,7 +68,7 @@ static void
 xfs_dir3_block_read_verify(
        struct xfs_buf  *bp)
 {
-       struct xfs_mount        *mp = bp->b_target->bt_mount;
+       struct xfs_mount        *mp = bp->b_mount;
        xfs_failaddr_t          fa;
 
        if (xfs_sb_version_hascrc(&mp->m_sb) &&
@@ -85,7 +85,7 @@ static void
 xfs_dir3_block_write_verify(
        struct xfs_buf  *bp)
 {
-       struct xfs_mount        *mp = bp->b_target->bt_mount;
+       struct xfs_mount        *mp = bp->b_mount;
        struct xfs_buf_log_item *bip = bp->b_log_item;
        struct xfs_dir3_blk_hdr *hdr3 = bp->b_addr;
        xfs_failaddr_t          fa;
index 98882445fa67b811ad49f811f12c2a5d33b5c49e..1215dadbcf85292a8cc58c449f7be3935ea7a13f 100644 (file)
@@ -48,14 +48,13 @@ __xfs_dir3_data_check(
        int                     i;              /* leaf index */
        int                     lastfree;       /* last entry was unused */
        xfs_dir2_leaf_entry_t   *lep=NULL;      /* block leaf entries */
-       xfs_mount_t             *mp;            /* filesystem mount point */
+       struct xfs_mount        *mp = bp->b_mount;
        char                    *p;             /* current data position */
        int                     stale;          /* count of stale leaves */
        struct xfs_name         name;
        const struct xfs_dir_ops *ops;
        struct xfs_da_geometry  *geo;
 
-       mp = bp->b_target->bt_mount;
        geo = mp->m_dir_geo;
 
        /*
@@ -247,7 +246,7 @@ static xfs_failaddr_t
 xfs_dir3_data_verify(
        struct xfs_buf          *bp)
 {
-       struct xfs_mount        *mp = bp->b_target->bt_mount;
+       struct xfs_mount        *mp = bp->b_mount;
        struct xfs_dir3_blk_hdr *hdr3 = bp->b_addr;
 
        if (!xfs_verify_magic(bp, hdr3->magic))
@@ -296,7 +295,7 @@ static void
 xfs_dir3_data_read_verify(
        struct xfs_buf  *bp)
 {
-       struct xfs_mount        *mp = bp->b_target->bt_mount;
+       struct xfs_mount        *mp = bp->b_mount;
        xfs_failaddr_t          fa;
 
        if (xfs_sb_version_hascrc(&mp->m_sb) &&
@@ -313,7 +312,7 @@ static void
 xfs_dir3_data_write_verify(
        struct xfs_buf  *bp)
 {
-       struct xfs_mount        *mp = bp->b_target->bt_mount;
+       struct xfs_mount        *mp = bp->b_mount;
        struct xfs_buf_log_item *bip = bp->b_log_item;
        struct xfs_dir3_blk_hdr *hdr3 = bp->b_addr;
        xfs_failaddr_t          fa;
index 9685398f7112d895b5f829017f87db1b7d7fb0c9..38d5e6ec41b3d3a3344f727218dfd592c164a151 100644 (file)
@@ -142,7 +142,7 @@ static xfs_failaddr_t
 xfs_dir3_leaf_verify(
        struct xfs_buf          *bp)
 {
-       struct xfs_mount        *mp = bp->b_target->bt_mount;
+       struct xfs_mount        *mp = bp->b_mount;
        struct xfs_dir2_leaf    *leaf = bp->b_addr;
        xfs_failaddr_t          fa;
 
@@ -157,7 +157,7 @@ static void
 xfs_dir3_leaf_read_verify(
        struct xfs_buf  *bp)
 {
-       struct xfs_mount        *mp = bp->b_target->bt_mount;
+       struct xfs_mount        *mp = bp->b_mount;
        xfs_failaddr_t          fa;
 
        if (xfs_sb_version_hascrc(&mp->m_sb) &&
@@ -174,7 +174,7 @@ static void
 xfs_dir3_leaf_write_verify(
        struct xfs_buf  *bp)
 {
-       struct xfs_mount        *mp = bp->b_target->bt_mount;
+       struct xfs_mount        *mp = bp->b_mount;
        struct xfs_buf_log_item *bip = bp->b_log_item;
        struct xfs_dir3_leaf_hdr *hdr3 = bp->b_addr;
        xfs_failaddr_t          fa;
index b34277d7d985a5d6351dff500670dfcef1653244..30968b579810b0eb150ac5535f2ef4c2bc804943 100644 (file)
@@ -82,7 +82,7 @@ static xfs_failaddr_t
 xfs_dir3_free_verify(
        struct xfs_buf          *bp)
 {
-       struct xfs_mount        *mp = bp->b_target->bt_mount;
+       struct xfs_mount        *mp = bp->b_mount;
        struct xfs_dir2_free_hdr *hdr = bp->b_addr;
 
        if (!xfs_verify_magic(bp, hdr->magic))
@@ -108,7 +108,7 @@ static void
 xfs_dir3_free_read_verify(
        struct xfs_buf  *bp)
 {
-       struct xfs_mount        *mp = bp->b_target->bt_mount;
+       struct xfs_mount        *mp = bp->b_mount;
        xfs_failaddr_t          fa;
 
        if (xfs_sb_version_hascrc(&mp->m_sb) &&
@@ -125,7 +125,7 @@ static void
 xfs_dir3_free_write_verify(
        struct xfs_buf  *bp)
 {
-       struct xfs_mount        *mp = bp->b_target->bt_mount;
+       struct xfs_mount        *mp = bp->b_mount;
        struct xfs_buf_log_item *bip = bp->b_log_item;
        struct xfs_dir3_blk_hdr *hdr3 = bp->b_addr;
        xfs_failaddr_t          fa;
index 3a4eaca2a79f93374d5591b75624709fb7a38e03..19554ef34c17d31596275461884cf477eb4bd301 100644 (file)
@@ -222,7 +222,7 @@ static xfs_failaddr_t
 xfs_dquot_buf_verify_struct(
        struct xfs_buf          *bp)
 {
-       struct xfs_mount        *mp = bp->b_target->bt_mount;
+       struct xfs_mount        *mp = bp->b_mount;
 
        return xfs_dquot_buf_verify(mp, bp, false);
 }
@@ -231,7 +231,7 @@ static void
 xfs_dquot_buf_read_verify(
        struct xfs_buf          *bp)
 {
-       struct xfs_mount        *mp = bp->b_target->bt_mount;
+       struct xfs_mount        *mp = bp->b_mount;
 
        if (!xfs_dquot_buf_verify_crc(mp, bp, false))
                return;
@@ -248,7 +248,7 @@ static void
 xfs_dquot_buf_readahead_verify(
        struct xfs_buf  *bp)
 {
-       struct xfs_mount        *mp = bp->b_target->bt_mount;
+       struct xfs_mount        *mp = bp->b_mount;
 
        if (!xfs_dquot_buf_verify_crc(mp, bp, true) ||
            xfs_dquot_buf_verify(mp, bp, true) != NULL) {
@@ -266,7 +266,7 @@ static void
 xfs_dquot_buf_write_verify(
        struct xfs_buf          *bp)
 {
-       struct xfs_mount        *mp = bp->b_target->bt_mount;
+       struct xfs_mount        *mp = bp->b_mount;
 
        xfs_dquot_buf_verify(mp, bp, false);
 }
index 7a86a3fd41d0eaf827921f1fb35ea7204f58b996..5043d0ff75638de71f5e3fe48a37e2158658d877 100644 (file)
@@ -2464,7 +2464,7 @@ static xfs_failaddr_t
 xfs_agi_verify(
        struct xfs_buf  *bp)
 {
-       struct xfs_mount *mp = bp->b_target->bt_mount;
+       struct xfs_mount *mp = bp->b_mount;
        struct xfs_agi  *agi = XFS_BUF_TO_AGI(bp);
        int             i;
 
@@ -2516,7 +2516,7 @@ static void
 xfs_agi_read_verify(
        struct xfs_buf  *bp)
 {
-       struct xfs_mount *mp = bp->b_target->bt_mount;
+       struct xfs_mount *mp = bp->b_mount;
        xfs_failaddr_t  fa;
 
        if (xfs_sb_version_hascrc(&mp->m_sb) &&
@@ -2533,7 +2533,7 @@ static void
 xfs_agi_write_verify(
        struct xfs_buf  *bp)
 {
-       struct xfs_mount        *mp = bp->b_target->bt_mount;
+       struct xfs_mount        *mp = bp->b_mount;
        struct xfs_buf_log_item *bip = bp->b_log_item;
        xfs_failaddr_t          fa;
 
index e169ca0f49788c03ad36c761c7b6234267cae602..558ad0a0f2f1803bd057a71cce1141926171a91e 100644 (file)
@@ -254,7 +254,7 @@ static xfs_failaddr_t
 xfs_inobt_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);
        xfs_failaddr_t          fa;
        unsigned int            level;
index 717016e34292a45818f226677f43f937560c7a39..20857f10853727d9c2503689bb882d3bac6a5a3e 100644 (file)
@@ -73,7 +73,7 @@ xfs_inode_buf_verify(
        struct xfs_buf  *bp,
        bool            readahead)
 {
-       struct xfs_mount *mp = bp->b_target->bt_mount;
+       struct xfs_mount *mp = bp->b_mount;
        xfs_agnumber_t  agno;
        int             i;
        int             ni;
index 0d8d5c22329808f240cd791a96ec49b10d9a2cc0..4b993ed7fc93e67796b8f019f7915aba9738d2c9 100644 (file)
@@ -202,7 +202,7 @@ STATIC xfs_failaddr_t
 xfs_refcountbt_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;
        xfs_failaddr_t          fa;
index 36860e71150e4d2df3edc8ca9812c8e0292b8f4a..7c831d6cb100a85564da456a5cabbbd40ff711fc 100644 (file)
@@ -290,7 +290,7 @@ static xfs_failaddr_t
 xfs_rmapbt_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;
        xfs_failaddr_t          fa;
index c256be3361e78106a07369c98b93c255e53dc172..4e45d75f568171a204be590dc3fd334bae7579ba 100644 (file)
@@ -663,7 +663,7 @@ xfs_sb_read_verify(
        struct xfs_buf          *bp)
 {
        struct xfs_sb           sb;
-       struct xfs_mount        *mp = bp->b_target->bt_mount;
+       struct xfs_mount        *mp = bp->b_mount;
        struct xfs_dsb          *dsb = XFS_BUF_TO_SBP(bp);
        int                     error;
 
@@ -729,7 +729,7 @@ xfs_sb_write_verify(
        struct xfs_buf          *bp)
 {
        struct xfs_sb           sb;
-       struct xfs_mount        *mp = bp->b_target->bt_mount;
+       struct xfs_mount        *mp = bp->b_mount;
        struct xfs_buf_log_item *bip = bp->b_log_item;
        int                     error;
 
index 66de21a3ac10f9b971726fb005f8b3cd3e41208c..32998ea2a5f84fc8ca91b8ab90652ce099aca10e 100644 (file)
@@ -86,7 +86,7 @@ static xfs_failaddr_t
 xfs_symlink_verify(
        struct xfs_buf          *bp)
 {
-       struct xfs_mount        *mp = bp->b_target->bt_mount;
+       struct xfs_mount        *mp = bp->b_mount;
        struct xfs_dsymlink_hdr *dsl = bp->b_addr;
 
        if (!xfs_sb_version_hascrc(&mp->m_sb))
@@ -112,7 +112,7 @@ static void
 xfs_symlink_read_verify(
        struct xfs_buf  *bp)
 {
-       struct xfs_mount *mp = bp->b_target->bt_mount;
+       struct xfs_mount *mp = bp->b_mount;
        xfs_failaddr_t  fa;
 
        /* no verification of non-crc buffers */
@@ -132,7 +132,7 @@ static void
 xfs_symlink_write_verify(
        struct xfs_buf  *bp)
 {
-       struct xfs_mount *mp = bp->b_target->bt_mount;
+       struct xfs_mount *mp = bp->b_mount;
        struct xfs_buf_log_item *bip = bp->b_log_item;
        xfs_failaddr_t          fa;