xfs: lift the XBF_IOEND_FAIL handling into xfs_buf_ioend_disposition

Keep all the error handling code together.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
This commit is contained in:
Christoph Hellwig 2020-09-01 10:55:45 -07:00 committed by Darrick J. Wong
parent 3cc498845a
commit 844c9358df

View File

@ -1283,6 +1283,14 @@ xfs_buf_ioend_disposition(
}
/* Still considered a transient error. Caller will schedule retries. */
if (bp->b_flags & _XBF_INODES)
xfs_buf_inode_io_fail(bp);
else if (bp->b_flags & _XBF_DQUOTS)
xfs_buf_dquot_io_fail(bp);
else
ASSERT(list_empty(&bp->b_li_list));
xfs_buf_ioerror(bp, 0);
xfs_buf_relse(bp);
return XBF_IOEND_FAIL;
resubmit:
@ -1336,14 +1344,6 @@ xfs_buf_ioend(
case XBF_IOEND_DONE:
return;
case XBF_IOEND_FAIL:
if (bp->b_flags & _XBF_INODES)
xfs_buf_inode_io_fail(bp);
else if (bp->b_flags & _XBF_DQUOTS)
xfs_buf_dquot_io_fail(bp);
else
ASSERT(list_empty(&bp->b_li_list));
xfs_buf_ioerror(bp, 0);
xfs_buf_relse(bp);
return;
default:
break;