Skip to content

Commit

Permalink
[SCSI] scsi_debug: fix duplicate dif_errors increment
Browse files Browse the repository at this point in the history
It is unnecessary to increase dif_errors in dif_verify(), because the
caller will increment it when dif_verify() detects failure.

This bug was introduced by commit beb40ea ("[SCSI] scsi_debug:
reduce duplication between prot_verify_read and prot_verify_write")

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
  • Loading branch information
Akinobu Mita authored and James Bottomley committed Mar 19, 2014
1 parent 11ddcec commit c613d06
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/scsi/scsi_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -1780,7 +1780,6 @@ static int dif_verify(struct sd_dif_tuple *sdt, const void *data,
be32_to_cpu(sdt->ref_tag) != ei_lba) {
pr_err("%s: REF check failed on sector %lu\n",
__func__, (unsigned long)sector);
dif_errors++;
return 0x03;
}
return 0;
Expand Down

0 comments on commit c613d06

Please sign in to comment.