aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_trans_buf.c
diff options
context:
space:
mode:
authorDavid Chinner <dgc@sgi.com>2008-04-09 22:22:17 -0400
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-04-17 22:00:24 -0400
commitd64e31a2f53cdcb2f95b782196faacb0995ca0c0 (patch)
treed13230aeeb739f263305c686168823e161bdf619 /fs/xfs/xfs_trans_buf.c
parent556b8b166c9514b5f940047a41dad8fe8cd9a778 (diff)
[XFS] Ensure errors from xfs_bdstrat() are correctly checked.
xfsbdstrat() is declared to return an error. That is never checked because the error is propagated by the xfs_buf_t that is passed through the function. Mark xfsbdstrat() as returning void and comment the prototype on the methods needed for error checking. SGI-PV: 980084 SGI-Modid: xfs-linux-melb:xfs-kern:30823a Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Niv Sardi <xaiki@sgi.com> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_trans_buf.c')
-rw-r--r--fs/xfs/xfs_trans_buf.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/xfs/xfs_trans_buf.c b/fs/xfs/xfs_trans_buf.c
index 4e5c010f504..cb0c5839154 100644
--- a/fs/xfs/xfs_trans_buf.c
+++ b/fs/xfs/xfs_trans_buf.c
@@ -354,17 +354,15 @@ xfs_trans_read_buf(
354 ASSERT(!XFS_BUF_ISASYNC(bp)); 354 ASSERT(!XFS_BUF_ISASYNC(bp));
355 XFS_BUF_READ(bp); 355 XFS_BUF_READ(bp);
356 xfsbdstrat(tp->t_mountp, bp); 356 xfsbdstrat(tp->t_mountp, bp);
357 xfs_iowait(bp); 357 error = xfs_iowait(bp);
358 if (XFS_BUF_GETERROR(bp) != 0) { 358 if (error) {
359 xfs_ioerror_alert("xfs_trans_read_buf", mp, 359 xfs_ioerror_alert("xfs_trans_read_buf", mp,
360 bp, blkno); 360 bp, blkno);
361 error = XFS_BUF_GETERROR(bp);
362 xfs_buf_relse(bp); 361 xfs_buf_relse(bp);
363 /* 362 /*
364 * We can gracefully recover from most 363 * We can gracefully recover from most read
365 * read errors. Ones we can't are those 364 * errors. Ones we can't are those that happen
366 * that happen after the transaction's 365 * after the transaction's already dirty.
367 * already dirty.
368 */ 366 */
369 if (tp->t_flags & XFS_TRANS_DIRTY) 367 if (tp->t_flags & XFS_TRANS_DIRTY)
370 xfs_force_shutdown(tp->t_mountp, 368 xfs_force_shutdown(tp->t_mountp,