mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
xfs: also mark the buffer stale on verifier failure in xfs_buf_submit
We should treat the buffer that caused a shutdown the same as handling buffers after a shutdown, so use the same stale && !DONE logic here. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com> Reviewed-by: "Darrick J. Wong" <djwong@kernel.org> Signed-off-by: Carlos Maiolino <cem@kernel.org>
This commit is contained in:
parent
6769087fd8
commit
0b434b552e
|
|
@ -1383,8 +1383,10 @@ xfs_buf_submit(
|
|||
* state here rather than mount state to avoid corrupting the log tail
|
||||
* on shutdown.
|
||||
*/
|
||||
if (bp->b_mount->m_log && xlog_is_shutdown(bp->b_mount->m_log))
|
||||
if (bp->b_mount->m_log && xlog_is_shutdown(bp->b_mount->m_log)) {
|
||||
xfs_buf_ioerror(bp, -EIO);
|
||||
goto ioerror;
|
||||
}
|
||||
|
||||
if (bp->b_flags & XBF_WRITE)
|
||||
xfs_buf_wait_unpin(bp);
|
||||
|
|
@ -1396,8 +1398,9 @@ xfs_buf_submit(
|
|||
bp->b_error = 0;
|
||||
|
||||
if ((bp->b_flags & XBF_WRITE) && !xfs_buf_verify_write(bp)) {
|
||||
/* ->verify_write should have set b_error already */
|
||||
xfs_force_shutdown(bp->b_mount, SHUTDOWN_CORRUPT_INCORE);
|
||||
goto end_io;
|
||||
goto ioerror;
|
||||
}
|
||||
|
||||
/* In-memory targets are directly mapped, no I/O required. */
|
||||
|
|
@ -1410,7 +1413,6 @@ xfs_buf_submit(
|
|||
ioerror:
|
||||
bp->b_flags &= ~XBF_DONE;
|
||||
xfs_buf_stale(bp);
|
||||
xfs_buf_ioerror(bp, -EIO);
|
||||
end_io:
|
||||
xfs_buf_ioend(bp);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user