[PATCH 09/20] qla2xxx: Change check_stop_free to always return 1

Himanshu Madhani
2015-12-08T00:48:56Z

From: Quinn Tran <quinn.tran@qlogic.com>

change tcm_qla2xxx_check_stop_free to always return 1
to prevent transport_cmd_finish_abort from accidently
taking extra kref_put.

Signed-off-by: Quinn Tran <quinn.tran@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
---
drivers/scsi/qla2xxx/tcm_qla2xxx.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
index 74c6e9b..366142a 100644
--- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
+++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
@@ -314,7 +314,8 @@ static int tcm_qla2xxx_check_stop_free(struct se_cmd *se_cmd)
cmd->cmd_flags |= BIT_14;
}

- return target_put_sess_cmd(se_cmd);
+ target_put_sess_cmd(se_cmd);
+ return 1;
}

/* tcm_qla2xxx_release_cmd - Callback from TCM Core to release underlying
--
1.7.7