diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2014-02-26 08:57:00 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2014-03-19 14:42:52 -0400 |
commit | c613d061ce01be1f4e195f4666d4a99e5284cb5d (patch) | |
tree | fce5bc4bb0a9e710ebc1c482e3218a7a67a283a3 | |
parent | 11ddceca99ae9a3e124b91dfe9c5342ee09f376d (diff) |
[SCSI] scsi_debug: fix duplicate dif_errors increment
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 beb40ea42bd6 ("[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>
-rw-r--r-- | drivers/scsi/scsi_debug.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index 9cd211ea4719..1a4288032110 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c | |||
@@ -1780,7 +1780,6 @@ static int dif_verify(struct sd_dif_tuple *sdt, const void *data, | |||
1780 | be32_to_cpu(sdt->ref_tag) != ei_lba) { | 1780 | be32_to_cpu(sdt->ref_tag) != ei_lba) { |
1781 | pr_err("%s: REF check failed on sector %lu\n", | 1781 | pr_err("%s: REF check failed on sector %lu\n", |
1782 | __func__, (unsigned long)sector); | 1782 | __func__, (unsigned long)sector); |
1783 | dif_errors++; | ||
1784 | return 0x03; | 1783 | return 0x03; |
1785 | } | 1784 | } |
1786 | return 0; | 1785 | return 0; |