Commit e0d2c23a authored by Eric Sandeen's avatar Eric Sandeen Committed by Dave Chinner

xfs: skip pointless CRC updates after verifier failures

Most write verifiers don't update CRCs after the verifier
has failed and the buffer has been marked in error.  These
two didn't, but should.

Add returns to the verifier failure block, since the buffer
won't be written anyway.
Signed-off-by: default avatarEric Sandeen <sandeen@redhat.com>
Reviewed-by: default avatarJie Liu <jeff.liu@oracle.com>
Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
parent 5ef11eb0
......@@ -373,6 +373,7 @@ xfs_allocbt_write_verify(
XFS_CORRUPTION_ERROR(__func__, XFS_ERRLEVEL_LOW,
bp->b_target->bt_mount, bp->b_addr);
xfs_buf_ioerror(bp, EFSCORRUPTED);
return;
}
xfs_btree_sblock_calc_crc(bp);
......
......@@ -261,6 +261,7 @@ xfs_inobt_write_verify(
XFS_CORRUPTION_ERROR(__func__, XFS_ERRLEVEL_LOW,
bp->b_target->bt_mount, bp->b_addr);
xfs_buf_ioerror(bp, EFSCORRUPTED);
return;
}
xfs_btree_sblock_calc_crc(bp);
......
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