aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_trans_buf.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_trans_buf.c')
-rw-r--r--fs/xfs/xfs_trans_buf.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/fs/xfs/xfs_trans_buf.c b/fs/xfs/xfs_trans_buf.c
index 1bc04d4e7eb1..f9f1bf6ab4b8 100644
--- a/fs/xfs/xfs_trans_buf.c
+++ b/fs/xfs/xfs_trans_buf.c
@@ -194,7 +194,7 @@ xfs_trans_get_buf(xfs_trans_t *tp,
194 return NULL; 194 return NULL;
195 } 195 }
196 196
197 ASSERT(!XFS_BUF_GETERROR(bp)); 197 ASSERT(!bp->b_error);
198 198
199 _xfs_trans_bjoin(tp, bp, 1); 199 _xfs_trans_bjoin(tp, bp, 1);
200 trace_xfs_trans_get_buf(bp->b_fspriv); 200 trace_xfs_trans_get_buf(bp->b_fspriv);
@@ -293,10 +293,10 @@ xfs_trans_read_buf(
293 return (flags & XBF_TRYLOCK) ? 293 return (flags & XBF_TRYLOCK) ?
294 EAGAIN : XFS_ERROR(ENOMEM); 294 EAGAIN : XFS_ERROR(ENOMEM);
295 295
296 if (XFS_BUF_GETERROR(bp) != 0) { 296 if (bp->b_error) {
297 error = bp->b_error;
297 xfs_ioerror_alert("xfs_trans_read_buf", mp, 298 xfs_ioerror_alert("xfs_trans_read_buf", mp,
298 bp, blkno); 299 bp, blkno);
299 error = XFS_BUF_GETERROR(bp);
300 xfs_buf_relse(bp); 300 xfs_buf_relse(bp);
301 return error; 301 return error;
302 } 302 }
@@ -330,7 +330,7 @@ xfs_trans_read_buf(
330 ASSERT(xfs_buf_islocked(bp)); 330 ASSERT(xfs_buf_islocked(bp));
331 ASSERT(bp->b_transp == tp); 331 ASSERT(bp->b_transp == tp);
332 ASSERT(bp->b_fspriv != NULL); 332 ASSERT(bp->b_fspriv != NULL);
333 ASSERT((XFS_BUF_ISERROR(bp)) == 0); 333 ASSERT(!bp->b_error);
334 if (!(XFS_BUF_ISDONE(bp))) { 334 if (!(XFS_BUF_ISDONE(bp))) {
335 trace_xfs_trans_read_buf_io(bp, _RET_IP_); 335 trace_xfs_trans_read_buf_io(bp, _RET_IP_);
336 ASSERT(!XFS_BUF_ISASYNC(bp)); 336 ASSERT(!XFS_BUF_ISASYNC(bp));
@@ -386,10 +386,9 @@ xfs_trans_read_buf(
386 return (flags & XBF_TRYLOCK) ? 386 return (flags & XBF_TRYLOCK) ?
387 0 : XFS_ERROR(ENOMEM); 387 0 : XFS_ERROR(ENOMEM);
388 } 388 }
389 if (XFS_BUF_GETERROR(bp) != 0) { 389 if (bp->b_error) {
390 XFS_BUF_SUPER_STALE(bp); 390 error = bp->b_error;
391 error = XFS_BUF_GETERROR(bp); 391 XFS_BUF_SUPER_STALE(bp);
392
393 xfs_ioerror_alert("xfs_trans_read_buf", mp, 392 xfs_ioerror_alert("xfs_trans_read_buf", mp,
394 bp, blkno); 393 bp, blkno);
395 if (tp->t_flags & XFS_TRANS_DIRTY) 394 if (tp->t_flags & XFS_TRANS_DIRTY)