[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>
This commit is contained in:
committed by
Lachlan McIlroy
parent
556b8b166c
commit
d64e31a2f5
@@ -354,17 +354,15 @@ xfs_trans_read_buf(
|
||||
ASSERT(!XFS_BUF_ISASYNC(bp));
|
||||
XFS_BUF_READ(bp);
|
||||
xfsbdstrat(tp->t_mountp, bp);
|
||||
xfs_iowait(bp);
|
||||
if (XFS_BUF_GETERROR(bp) != 0) {
|
||||
error = xfs_iowait(bp);
|
||||
if (error) {
|
||||
xfs_ioerror_alert("xfs_trans_read_buf", mp,
|
||||
bp, blkno);
|
||||
error = XFS_BUF_GETERROR(bp);
|
||||
xfs_buf_relse(bp);
|
||||
/*
|
||||
* We can gracefully recover from most
|
||||
* read errors. Ones we can't are those
|
||||
* that happen after the transaction's
|
||||
* already dirty.
|
||||
* We can gracefully recover from most read
|
||||
* errors. Ones we can't are those that happen
|
||||
* after the transaction's already dirty.
|
||||
*/
|
||||
if (tp->t_flags & XFS_TRANS_DIRTY)
|
||||
xfs_force_shutdown(tp->t_mountp,
|
||||
|
Reference in New Issue
Block a user