aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2011-10-10 12:52:45 -0400
committerAlex Elder <aelder@sgi.com>2011-10-11 22:15:09 -0400
commit38f23232449c9d2c0bc8e9541cb8ab08b7c2b9ce (patch)
tree2713a5b8d1e42ef1a12047d839e4247381b95256 /fs/xfs
parent5fde0326ddb1472ef31034c8ed952a19d4679191 (diff)
xfs: remove XFS_BUF_SET_VTYPE and XFS_BUF_SET_VTYPE_REF
Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/xfs_alloc.c4
-rw-r--r--fs/xfs/xfs_btree.c8
-rw-r--r--fs/xfs/xfs_buf.h7
-rw-r--r--fs/xfs/xfs_da_btree.c11
-rw-r--r--fs/xfs/xfs_dquot.c2
-rw-r--r--fs/xfs/xfs_ialloc.c2
-rw-r--r--fs/xfs/xfs_inode.c6
7 files changed, 13 insertions, 27 deletions
diff --git a/fs/xfs/xfs_alloc.c b/fs/xfs/xfs_alloc.c
index bdd9cb54d63b..ce84ffd0264c 100644
--- a/fs/xfs/xfs_alloc.c
+++ b/fs/xfs/xfs_alloc.c
@@ -452,7 +452,7 @@ xfs_alloc_read_agfl(
452 if (error) 452 if (error)
453 return error; 453 return error;
454 ASSERT(!xfs_buf_geterror(bp)); 454 ASSERT(!xfs_buf_geterror(bp));
455 XFS_BUF_SET_VTYPE_REF(bp, B_FS_AGFL, XFS_AGFL_REF); 455 xfs_buf_set_ref(bp, XFS_AGFL_REF);
456 *bpp = bp; 456 *bpp = bp;
457 return 0; 457 return 0;
458} 458}
@@ -2139,7 +2139,7 @@ xfs_read_agf(
2139 xfs_trans_brelse(tp, *bpp); 2139 xfs_trans_brelse(tp, *bpp);
2140 return XFS_ERROR(EFSCORRUPTED); 2140 return XFS_ERROR(EFSCORRUPTED);
2141 } 2141 }
2142 XFS_BUF_SET_VTYPE_REF(*bpp, B_FS_AGF, XFS_AGF_REF); 2142 xfs_buf_set_ref(*bpp, XFS_AGF_REF);
2143 return 0; 2143 return 0;
2144} 2144}
2145 2145
diff --git a/fs/xfs/xfs_btree.c b/fs/xfs/xfs_btree.c
index 28cc0199dc1f..1f19f03af9d3 100644
--- a/fs/xfs/xfs_btree.c
+++ b/fs/xfs/xfs_btree.c
@@ -631,7 +631,7 @@ xfs_btree_read_bufl(
631 } 631 }
632 ASSERT(!xfs_buf_geterror(bp)); 632 ASSERT(!xfs_buf_geterror(bp));
633 if (bp) 633 if (bp)
634 XFS_BUF_SET_VTYPE_REF(bp, B_FS_MAP, refval); 634 xfs_buf_set_ref(bp, refval);
635 *bpp = bp; 635 *bpp = bp;
636 return 0; 636 return 0;
637} 637}
@@ -939,13 +939,13 @@ xfs_btree_set_refs(
939 switch (cur->bc_btnum) { 939 switch (cur->bc_btnum) {
940 case XFS_BTNUM_BNO: 940 case XFS_BTNUM_BNO:
941 case XFS_BTNUM_CNT: 941 case XFS_BTNUM_CNT:
942 XFS_BUF_SET_VTYPE_REF(bp, B_FS_MAP, XFS_ALLOC_BTREE_REF); 942 xfs_buf_set_ref(bp, XFS_ALLOC_BTREE_REF);
943 break; 943 break;
944 case XFS_BTNUM_INO: 944 case XFS_BTNUM_INO:
945 XFS_BUF_SET_VTYPE_REF(bp, B_FS_INOMAP, XFS_INO_BTREE_REF); 945 xfs_buf_set_ref(bp, XFS_INO_BTREE_REF);
946 break; 946 break;
947 case XFS_BTNUM_BMAP: 947 case XFS_BTNUM_BMAP:
948 XFS_BUF_SET_VTYPE_REF(bp, B_FS_MAP, XFS_BMAP_BTREE_REF); 948 xfs_buf_set_ref(bp, XFS_BMAP_BTREE_REF);
949 break; 949 break;
950 default: 950 default:
951 ASSERT(0); 951 ASSERT(0);
diff --git a/fs/xfs/xfs_buf.h b/fs/xfs/xfs_buf.h
index 65181220c9a2..ca2934717343 100644
--- a/fs/xfs/xfs_buf.h
+++ b/fs/xfs/xfs_buf.h
@@ -278,15 +278,10 @@ void xfs_buf_stale(struct xfs_buf *bp);
278#define XFS_BUF_SIZE(bp) ((bp)->b_buffer_length) 278#define XFS_BUF_SIZE(bp) ((bp)->b_buffer_length)
279#define XFS_BUF_SET_SIZE(bp, cnt) ((bp)->b_buffer_length = (cnt)) 279#define XFS_BUF_SET_SIZE(bp, cnt) ((bp)->b_buffer_length = (cnt))
280 280
281static inline void 281static inline void xfs_buf_set_ref(struct xfs_buf *bp, int lru_ref)
282xfs_buf_set_ref(
283 struct xfs_buf *bp,
284 int lru_ref)
285{ 282{
286 atomic_set(&bp->b_lru_ref, lru_ref); 283 atomic_set(&bp->b_lru_ref, lru_ref);
287} 284}
288#define XFS_BUF_SET_VTYPE_REF(bp, type, ref) xfs_buf_set_ref(bp, ref)
289#define XFS_BUF_SET_VTYPE(bp, type) do { } while (0)
290 285
291static inline int xfs_buf_ispinned(struct xfs_buf *bp) 286static inline int xfs_buf_ispinned(struct xfs_buf *bp)
292{ 287{
diff --git a/fs/xfs/xfs_da_btree.c b/fs/xfs/xfs_da_btree.c
index 46c8aa2740da..77c74257c2a3 100644
--- a/fs/xfs/xfs_da_btree.c
+++ b/fs/xfs/xfs_da_btree.c
@@ -2053,13 +2053,10 @@ xfs_da_do_buf(
2053 if (!bp) 2053 if (!bp)
2054 continue; 2054 continue;
2055 if (caller == 1) { 2055 if (caller == 1) {
2056 if (whichfork == XFS_ATTR_FORK) { 2056 if (whichfork == XFS_ATTR_FORK)
2057 XFS_BUF_SET_VTYPE_REF(bp, B_FS_ATTR_BTREE, 2057 xfs_buf_set_ref(bp, XFS_ATTR_BTREE_REF);
2058 XFS_ATTR_BTREE_REF); 2058 else
2059 } else { 2059 xfs_buf_set_ref(bp, XFS_DIR_BTREE_REF);
2060 XFS_BUF_SET_VTYPE_REF(bp, B_FS_DIR_BTREE,
2061 XFS_DIR_BTREE_REF);
2062 }
2063 } 2060 }
2064 if (bplist) { 2061 if (bplist) {
2065 bplist[nbplist++] = bp; 2062 bplist[nbplist++] = bp;
diff --git a/fs/xfs/xfs_dquot.c b/fs/xfs/xfs_dquot.c
index c597bfe4ada0..25d7280e9f6b 100644
--- a/fs/xfs/xfs_dquot.c
+++ b/fs/xfs/xfs_dquot.c
@@ -605,7 +605,7 @@ xfs_qm_dqread(
605 dqp->q_res_rtbcount = be64_to_cpu(ddqp->d_rtbcount); 605 dqp->q_res_rtbcount = be64_to_cpu(ddqp->d_rtbcount);
606 606
607 /* Mark the buf so that this will stay incore a little longer */ 607 /* Mark the buf so that this will stay incore a little longer */
608 XFS_BUF_SET_VTYPE_REF(bp, B_FS_DQUOT, XFS_DQUOT_REF); 608 xfs_buf_set_ref(bp, XFS_DQUOT_REF);
609 609
610 /* 610 /*
611 * We got the buffer with a xfs_trans_read_buf() (in dqtobp()) 611 * We got the buffer with a xfs_trans_read_buf() (in dqtobp())
diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c
index 207e0b0c0730..169380e66057 100644
--- a/fs/xfs/xfs_ialloc.c
+++ b/fs/xfs/xfs_ialloc.c
@@ -1505,7 +1505,7 @@ xfs_read_agi(
1505 return XFS_ERROR(EFSCORRUPTED); 1505 return XFS_ERROR(EFSCORRUPTED);
1506 } 1506 }
1507 1507
1508 XFS_BUF_SET_VTYPE_REF(*bpp, B_FS_AGI, XFS_AGI_REF); 1508 xfs_buf_set_ref(*bpp, XFS_AGI_REF);
1509 1509
1510 xfs_check_agi_unlinked(agi); 1510 xfs_check_agi_unlinked(agi);
1511 return 0; 1511 return 0;
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index b676494a55ca..21cec6cdf453 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -190,12 +190,6 @@ xfs_imap_to_bp(
190 } 190 }
191 191
192 xfs_inobp_check(mp, bp); 192 xfs_inobp_check(mp, bp);
193
194 /*
195 * Mark the buffer as an inode buffer now that it looks good
196 */
197 XFS_BUF_SET_VTYPE(bp, B_FS_INO);
198
199 *bpp = bp; 193 *bpp = bp;
200 return 0; 194 return 0;
201} 195}