From: Dave Chinner Date: Thu, 6 Mar 2014 23:25:17 +0000 (+1100) Subject: libxfs: skip pointless CRC updates after verifier failures X-Git-Tag: v3.2.0-rc1~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dbf564d1302eb2b0d665dc177a5d9a3ed205820e;p=thirdparty%2Fxfsprogs-dev.git libxfs: skip pointless CRC updates after verifier failures [userspace port] 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: Dave Chinner Reviewed-by: Eric Sandeen Signed-off-by: Dave Chinner --- diff --git a/libxfs/xfs_alloc_btree.c b/libxfs/xfs_alloc_btree.c index 282a3202c..5b38c24f1 100644 --- a/libxfs/xfs_alloc_btree.c +++ b/libxfs/xfs_alloc_btree.c @@ -355,6 +355,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); diff --git a/libxfs/xfs_ialloc_btree.c b/libxfs/xfs_ialloc_btree.c index 27a5dd99d..d9589b7d0 100644 --- a/libxfs/xfs_ialloc_btree.c +++ b/libxfs/xfs_ialloc_btree.c @@ -242,6 +242,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);