Commit 844c9358 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by 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: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
parent 3cc49884
...@@ -1283,6 +1283,14 @@ xfs_buf_ioend_disposition( ...@@ -1283,6 +1283,14 @@ xfs_buf_ioend_disposition(
} }
/* Still considered a transient error. Caller will schedule retries. */ /* 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; return XBF_IOEND_FAIL;
resubmit: resubmit:
...@@ -1336,14 +1344,6 @@ xfs_buf_ioend( ...@@ -1336,14 +1344,6 @@ xfs_buf_ioend(
case XBF_IOEND_DONE: case XBF_IOEND_DONE:
return; return;
case XBF_IOEND_FAIL: 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; return;
default: default:
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment