提交 844c9358 编写于 作者: C Christoph Hellwig 提交者: Darrick J. Wong

xfs: lift the XBF_IOEND_FAIL handling into xfs_buf_ioend_disposition

Keep all the error handling code together.
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Reviewed-by: NDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
上级 3cc49884
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册