diff mbox

[2/2] scsi: lpfc: don't double count abort errors

Message ID 20170630080352.mmfyjjxsznzx75yf@mwanda (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Dan Carpenter June 30, 2017, 8:03 a.m. UTC
If lpfc_nvmet_unsol_fcp_issue_abort() fails then we accidentally
increment "tgtp->xmt_abort_rsp_error" and then two lines later we
increment it a second time.

Fixes: 547077a44b3b ("scsi: lpfc: Adding additional stats counters for nvme.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Comments

James Smart June 30, 2017, 2:56 p.m. UTC | #1
On 6/30/2017 1:03 AM, Dan Carpenter wrote:
> If lpfc_nvmet_unsol_fcp_issue_abort() fails then we accidentally
> increment "tgtp->xmt_abort_rsp_error" and then two lines later we
> increment it a second time.
>
> Fixes: 547077a44b3b ("scsi: lpfc: Adding additional stats counters for nvme.")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/scsi/lpfc/lpfc_nvmet.c b/drivers/scsi/lpfc/lpfc_nvmet.c
> index 7dc061a14f95..fbeec344c6cc 100644
> --- a/drivers/scsi/lpfc/lpfc_nvmet.c
> +++ b/drivers/scsi/lpfc/lpfc_nvmet.c
> @@ -2583,7 +2583,6 @@ lpfc_nvmet_unsol_fcp_issue_abort(struct lpfc_hba *phba,
>   	}
>   
>   aerr:
> -	atomic_inc(&tgtp->xmt_abort_rsp_error);
>   	ctxp->flag &= ~LPFC_NVMET_ABORT_OP;
>   	atomic_inc(&tgtp->xmt_abort_rsp_error);
>   	lpfc_printf_log(phba, KERN_ERR, LOG_NVME_ABTS,

looks good.

Signed-off-By: James Smart <james.smart@broadcom.com>
Martin K. Petersen July 1, 2017, 9:09 p.m. UTC | #2
Dan,

> If lpfc_nvmet_unsol_fcp_issue_abort() fails then we accidentally
> increment "tgtp->xmt_abort_rsp_error" and then two lines later we
> increment it a second time.

Applied to 4.13/scsi-queue.
diff mbox

Patch

diff --git a/drivers/scsi/lpfc/lpfc_nvmet.c b/drivers/scsi/lpfc/lpfc_nvmet.c
index 7dc061a14f95..fbeec344c6cc 100644
--- a/drivers/scsi/lpfc/lpfc_nvmet.c
+++ b/drivers/scsi/lpfc/lpfc_nvmet.c
@@ -2583,7 +2583,6 @@  lpfc_nvmet_unsol_fcp_issue_abort(struct lpfc_hba *phba,
 	}
 
 aerr:
-	atomic_inc(&tgtp->xmt_abort_rsp_error);
 	ctxp->flag &= ~LPFC_NVMET_ABORT_OP;
 	atomic_inc(&tgtp->xmt_abort_rsp_error);
 	lpfc_printf_log(phba, KERN_ERR, LOG_NVME_ABTS,