xfs: remove XFS_BUF_SET_VTYPE and XFS_BUF_SET_VTYPE_REF
authorChristoph Hellwig <hch@infradead.org>
Mon, 10 Oct 2011 16:52:45 +0000 (16:52 +0000)
committerAlex Elder <aelder@sgi.com>
Wed, 12 Oct 2011 02:15:09 +0000 (21:15 -0500)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
fs/xfs/xfs_alloc.c
fs/xfs/xfs_btree.c
fs/xfs/xfs_buf.h
fs/xfs/xfs_da_btree.c
fs/xfs/xfs_dquot.c
fs/xfs/xfs_ialloc.c
fs/xfs/xfs_inode.c

index bdd9cb54d63bb04fcc3fdcf5fc04d66db25ce015..ce84ffd0264c86c77111145075c14fdc11b8a12f 100644 (file)
@@ -452,7 +452,7 @@ xfs_alloc_read_agfl(
        if (error)
                return error;
        ASSERT(!xfs_buf_geterror(bp));
-       XFS_BUF_SET_VTYPE_REF(bp, B_FS_AGFL, XFS_AGFL_REF);
+       xfs_buf_set_ref(bp, XFS_AGFL_REF);
        *bpp = bp;
        return 0;
 }
@@ -2139,7 +2139,7 @@ xfs_read_agf(
                xfs_trans_brelse(tp, *bpp);
                return XFS_ERROR(EFSCORRUPTED);
        }
-       XFS_BUF_SET_VTYPE_REF(*bpp, B_FS_AGF, XFS_AGF_REF);
+       xfs_buf_set_ref(*bpp, XFS_AGF_REF);
        return 0;
 }
 
index 28cc0199dc1f2c2708ba2108f70877915ad7e027..1f19f03af9d3daa03ad20f21cbfd25d324870fed 100644 (file)
@@ -631,7 +631,7 @@ xfs_btree_read_bufl(
        }
        ASSERT(!xfs_buf_geterror(bp));
        if (bp)
-               XFS_BUF_SET_VTYPE_REF(bp, B_FS_MAP, refval);
+               xfs_buf_set_ref(bp, refval);
        *bpp = bp;
        return 0;
 }
@@ -939,13 +939,13 @@ xfs_btree_set_refs(
        switch (cur->bc_btnum) {
        case XFS_BTNUM_BNO:
        case XFS_BTNUM_CNT:
-               XFS_BUF_SET_VTYPE_REF(bp, B_FS_MAP, XFS_ALLOC_BTREE_REF);
+               xfs_buf_set_ref(bp, XFS_ALLOC_BTREE_REF);
                break;
        case XFS_BTNUM_INO:
-               XFS_BUF_SET_VTYPE_REF(bp, B_FS_INOMAP, XFS_INO_BTREE_REF);
+               xfs_buf_set_ref(bp, XFS_INO_BTREE_REF);
                break;
        case XFS_BTNUM_BMAP:
-               XFS_BUF_SET_VTYPE_REF(bp, B_FS_MAP, XFS_BMAP_BTREE_REF);
+               xfs_buf_set_ref(bp, XFS_BMAP_BTREE_REF);
                break;
        default:
                ASSERT(0);
index 65181220c9a20dd9004bdbe9220ec356dc07b494..ca29347173434f5794ac07829aabed2cfbbbf913 100644 (file)
@@ -278,15 +278,10 @@ void xfs_buf_stale(struct xfs_buf *bp);
 #define XFS_BUF_SIZE(bp)               ((bp)->b_buffer_length)
 #define XFS_BUF_SET_SIZE(bp, cnt)      ((bp)->b_buffer_length = (cnt))
 
-static inline void
-xfs_buf_set_ref(
-       struct xfs_buf  *bp,
-       int             lru_ref)
+static inline void xfs_buf_set_ref(struct xfs_buf *bp, int lru_ref)
 {
        atomic_set(&bp->b_lru_ref, lru_ref);
 }
-#define XFS_BUF_SET_VTYPE_REF(bp, type, ref)   xfs_buf_set_ref(bp, ref)
-#define XFS_BUF_SET_VTYPE(bp, type)            do { } while (0)
 
 static inline int xfs_buf_ispinned(struct xfs_buf *bp)
 {
index 46c8aa2740da441e341d174b9d09745d608fd057..77c74257c2a3b7e631f9ebfa6e25f6b1f3bcf46d 100644 (file)
@@ -2053,13 +2053,10 @@ xfs_da_do_buf(
                if (!bp)
                        continue;
                if (caller == 1) {
-                       if (whichfork == XFS_ATTR_FORK) {
-                               XFS_BUF_SET_VTYPE_REF(bp, B_FS_ATTR_BTREE,
-                                               XFS_ATTR_BTREE_REF);
-                       } else {
-                               XFS_BUF_SET_VTYPE_REF(bp, B_FS_DIR_BTREE,
-                                               XFS_DIR_BTREE_REF);
-                       }
+                       if (whichfork == XFS_ATTR_FORK)
+                               xfs_buf_set_ref(bp, XFS_ATTR_BTREE_REF);
+                       else
+                               xfs_buf_set_ref(bp, XFS_DIR_BTREE_REF);
                }
                if (bplist) {
                        bplist[nbplist++] = bp;
index c597bfe4ada04a11335d924916242daf5f819e2c..25d7280e9f6bb9de30822fed909cda099d7fbee1 100644 (file)
@@ -605,7 +605,7 @@ xfs_qm_dqread(
        dqp->q_res_rtbcount = be64_to_cpu(ddqp->d_rtbcount);
 
        /* Mark the buf so that this will stay incore a little longer */
-       XFS_BUF_SET_VTYPE_REF(bp, B_FS_DQUOT, XFS_DQUOT_REF);
+       xfs_buf_set_ref(bp, XFS_DQUOT_REF);
 
        /*
         * We got the buffer with a xfs_trans_read_buf() (in dqtobp())
index 207e0b0c0730a8b47a8625e45408620908edcc19..169380e66057940c43de0366500f246b3580b6ce 100644 (file)
@@ -1505,7 +1505,7 @@ xfs_read_agi(
                return XFS_ERROR(EFSCORRUPTED);
        }
 
-       XFS_BUF_SET_VTYPE_REF(*bpp, B_FS_AGI, XFS_AGI_REF);
+       xfs_buf_set_ref(*bpp, XFS_AGI_REF);
 
        xfs_check_agi_unlinked(agi);
        return 0;
index b676494a55ca7ffc41cb0998685ea0f0523537b2..21cec6cdf453dc242af7cfc702ace0e526ca81a6 100644 (file)
@@ -190,12 +190,6 @@ xfs_imap_to_bp(
        }
 
        xfs_inobp_check(mp, bp);
-
-       /*
-        * Mark the buffer as an inode buffer now that it looks good
-        */
-       XFS_BUF_SET_VTYPE(bp, B_FS_INO);
-
        *bpp = bp;
        return 0;
 }