aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/xfs/xfs_alloc.c1
-rw-r--r--fs/xfs/xfs_btree.c12
-rw-r--r--fs/xfs/xfs_buf.h5
-rw-r--r--fs/xfs/xfs_buf_item.c2
-rw-r--r--fs/xfs/xfs_dquot.c6
-rw-r--r--fs/xfs/xfs_ialloc.c1
-rw-r--r--fs/xfs/xfs_log.c2
-rw-r--r--fs/xfs/xfs_rtbitmap.c1
8 files changed, 7 insertions, 23 deletions
diff --git a/fs/xfs/xfs_alloc.c b/fs/xfs/xfs_alloc.c
index c1cf6a336a72..077c3417a54e 100644
--- a/fs/xfs/xfs_alloc.c
+++ b/fs/xfs/xfs_alloc.c
@@ -541,7 +541,6 @@ xfs_alloc_read_agfl(
541 XFS_FSS_TO_BB(mp, 1), 0, &bp, &xfs_agfl_buf_ops); 541 XFS_FSS_TO_BB(mp, 1), 0, &bp, &xfs_agfl_buf_ops);
542 if (error) 542 if (error)
543 return error; 543 return error;
544 ASSERT(!xfs_buf_geterror(bp));
545 xfs_buf_set_ref(bp, XFS_AGFL_REF); 544 xfs_buf_set_ref(bp, XFS_AGFL_REF);
546 *bpp = bp; 545 *bpp = bp;
547 return 0; 546 return 0;
diff --git a/fs/xfs/xfs_btree.c b/fs/xfs/xfs_btree.c
index e80d59fdf89a..22707adb99ab 100644
--- a/fs/xfs/xfs_btree.c
+++ b/fs/xfs/xfs_btree.c
@@ -552,14 +552,11 @@ xfs_btree_get_bufl(
552 xfs_fsblock_t fsbno, /* file system block number */ 552 xfs_fsblock_t fsbno, /* file system block number */
553 uint lock) /* lock flags for get_buf */ 553 uint lock) /* lock flags for get_buf */
554{ 554{
555 xfs_buf_t *bp; /* buffer pointer (return value) */
556 xfs_daddr_t d; /* real disk block address */ 555 xfs_daddr_t d; /* real disk block address */
557 556
558 ASSERT(fsbno != NULLFSBLOCK); 557 ASSERT(fsbno != NULLFSBLOCK);
559 d = XFS_FSB_TO_DADDR(mp, fsbno); 558 d = XFS_FSB_TO_DADDR(mp, fsbno);
560 bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, d, mp->m_bsize, lock); 559 return xfs_trans_get_buf(tp, mp->m_ddev_targp, d, mp->m_bsize, lock);
561 ASSERT(!xfs_buf_geterror(bp));
562 return bp;
563} 560}
564 561
565/* 562/*
@@ -574,15 +571,12 @@ xfs_btree_get_bufs(
574 xfs_agblock_t agbno, /* allocation group block number */ 571 xfs_agblock_t agbno, /* allocation group block number */
575 uint lock) /* lock flags for get_buf */ 572 uint lock) /* lock flags for get_buf */
576{ 573{
577 xfs_buf_t *bp; /* buffer pointer (return value) */
578 xfs_daddr_t d; /* real disk block address */ 574 xfs_daddr_t d; /* real disk block address */
579 575
580 ASSERT(agno != NULLAGNUMBER); 576 ASSERT(agno != NULLAGNUMBER);
581 ASSERT(agbno != NULLAGBLOCK); 577 ASSERT(agbno != NULLAGBLOCK);
582 d = XFS_AGB_TO_DADDR(mp, agno, agbno); 578 d = XFS_AGB_TO_DADDR(mp, agno, agbno);
583 bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, d, mp->m_bsize, lock); 579 return xfs_trans_get_buf(tp, mp->m_ddev_targp, d, mp->m_bsize, lock);
584 ASSERT(!xfs_buf_geterror(bp));
585 return bp;
586} 580}
587 581
588/* 582/*
@@ -722,7 +716,6 @@ xfs_btree_read_bufl(
722 mp->m_bsize, lock, &bp, ops); 716 mp->m_bsize, lock, &bp, ops);
723 if (error) 717 if (error)
724 return error; 718 return error;
725 ASSERT(!xfs_buf_geterror(bp));
726 if (bp) 719 if (bp)
727 xfs_buf_set_ref(bp, refval); 720 xfs_buf_set_ref(bp, refval);
728 *bpp = bp; 721 *bpp = bp;
@@ -1178,7 +1171,6 @@ xfs_btree_read_buf_block(
1178 if (error) 1171 if (error)
1179 return error; 1172 return error;
1180 1173
1181 ASSERT(!xfs_buf_geterror(*bpp));
1182 xfs_btree_set_refs(cur, *bpp); 1174 xfs_btree_set_refs(cur, *bpp);
1183 *block = XFS_BUF_TO_BLOCK(*bpp); 1175 *block = XFS_BUF_TO_BLOCK(*bpp);
1184 return 0; 1176 return 0;
diff --git a/fs/xfs/xfs_buf.h b/fs/xfs/xfs_buf.h
index b8a3abf6cf47..a999a3941c81 100644
--- a/fs/xfs/xfs_buf.h
+++ b/fs/xfs/xfs_buf.h
@@ -298,11 +298,6 @@ extern void xfs_buf_iomove(xfs_buf_t *, size_t, size_t, void *,
298 298
299extern int xfs_bioerror_relse(struct xfs_buf *); 299extern int xfs_bioerror_relse(struct xfs_buf *);
300 300
301static inline int xfs_buf_geterror(xfs_buf_t *bp)
302{
303 return bp ? bp->b_error : ENOMEM;
304}
305
306/* Buffer Utility Routines */ 301/* Buffer Utility Routines */
307extern xfs_caddr_t xfs_buf_offset(xfs_buf_t *, size_t); 302extern xfs_caddr_t xfs_buf_offset(xfs_buf_t *, size_t);
308 303
diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c
index 8752821443be..941f6e984ac4 100644
--- a/fs/xfs/xfs_buf_item.c
+++ b/fs/xfs/xfs_buf_item.c
@@ -1053,7 +1053,7 @@ xfs_buf_iodone_callbacks(
1053 static ulong lasttime; 1053 static ulong lasttime;
1054 static xfs_buftarg_t *lasttarg; 1054 static xfs_buftarg_t *lasttarg;
1055 1055
1056 if (likely(!xfs_buf_geterror(bp))) 1056 if (likely(!bp->b_error))
1057 goto do_callbacks; 1057 goto do_callbacks;
1058 1058
1059 /* 1059 /*
diff --git a/fs/xfs/xfs_dquot.c b/fs/xfs/xfs_dquot.c
index 868b19f096bf..8867d0232fac 100644
--- a/fs/xfs/xfs_dquot.c
+++ b/fs/xfs/xfs_dquot.c
@@ -353,10 +353,10 @@ xfs_qm_dqalloc(
353 dqp->q_blkno, 353 dqp->q_blkno,
354 mp->m_quotainfo->qi_dqchunklen, 354 mp->m_quotainfo->qi_dqchunklen,
355 0); 355 0);
356 356 if (!bp) {
357 error = xfs_buf_geterror(bp); 357 error = ENOMEM;
358 if (error)
359 goto error1; 358 goto error1;
359 }
360 bp->b_ops = &xfs_dquot_buf_ops; 360 bp->b_ops = &xfs_dquot_buf_ops;
361 361
362 /* 362 /*
diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c
index 8f711db61a0c..c254b1cac4f8 100644
--- a/fs/xfs/xfs_ialloc.c
+++ b/fs/xfs/xfs_ialloc.c
@@ -1640,7 +1640,6 @@ xfs_read_agi(
1640 if (error) 1640 if (error)
1641 return error; 1641 return error;
1642 1642
1643 ASSERT(!xfs_buf_geterror(*bpp));
1644 xfs_buf_set_ref(*bpp, XFS_AGI_REF); 1643 xfs_buf_set_ref(*bpp, XFS_AGI_REF);
1645 return 0; 1644 return 0;
1646} 1645}
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index a5f8bd9899d3..ae871df3a5a8 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -1165,7 +1165,7 @@ xlog_iodone(xfs_buf_t *bp)
1165 /* 1165 /*
1166 * Race to shutdown the filesystem if we see an error. 1166 * Race to shutdown the filesystem if we see an error.
1167 */ 1167 */
1168 if (XFS_TEST_ERROR((xfs_buf_geterror(bp)), l->l_mp, 1168 if (XFS_TEST_ERROR(bp->b_error, l->l_mp,
1169 XFS_ERRTAG_IODONE_IOERR, XFS_RANDOM_IODONE_IOERR)) { 1169 XFS_ERRTAG_IODONE_IOERR, XFS_RANDOM_IODONE_IOERR)) {
1170 xfs_buf_ioerror_alert(bp, __func__); 1170 xfs_buf_ioerror_alert(bp, __func__);
1171 xfs_buf_stale(bp); 1171 xfs_buf_stale(bp);
diff --git a/fs/xfs/xfs_rtbitmap.c b/fs/xfs/xfs_rtbitmap.c
index b1f2fe8af4a8..f4dd697cac08 100644
--- a/fs/xfs/xfs_rtbitmap.c
+++ b/fs/xfs/xfs_rtbitmap.c
@@ -74,7 +74,6 @@ xfs_rtbuf_get(
74 mp->m_bsize, 0, &bp, NULL); 74 mp->m_bsize, 0, &bp, NULL);
75 if (error) 75 if (error)
76 return error; 76 return error;
77 ASSERT(!xfs_buf_geterror(bp));
78 *bpp = bp; 77 *bpp = bp;
79 return 0; 78 return 0;
80} 79}