aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_btree.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_btree.c')
-rw-r--r--fs/xfs/xfs_btree.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/xfs/xfs_btree.c b/fs/xfs/xfs_btree.c
index 2b9fd385e27d..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);
@@ -970,7 +970,8 @@ xfs_btree_get_buf_block(
970 *bpp = xfs_trans_get_buf(cur->bc_tp, mp->m_ddev_targp, d, 970 *bpp = xfs_trans_get_buf(cur->bc_tp, mp->m_ddev_targp, d,
971 mp->m_bsize, flags); 971 mp->m_bsize, flags);
972 972
973 ASSERT(!xfs_buf_geterror(*bpp)); 973 if (!*bpp)
974 return ENOMEM;
974 975
975 *block = XFS_BUF_TO_BLOCK(*bpp); 976 *block = XFS_BUF_TO_BLOCK(*bpp);
976 return 0; 977 return 0;