summaryrefslogtreecommitdiff
path: root/drivers/scsi
diff options
context:
space:
mode:
authorjiangyiwen <jiangyiwen@huawei.com>2016-02-16 15:14:13 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2016-02-27 01:25:32 +0300
commite1cd3911170eda37fd9501e81ee1c2eb63803fd0 (patch)
treec4ff024d2f69d7e701dc8223668c43f674133ca7 /drivers/scsi
parent84e54c46b2f440a365a5224f1e5f173a462b7cca (diff)
downloadlinux-e1cd3911170eda37fd9501e81ee1c2eb63803fd0.tar.xz
SCSI: Free resources when we return BLKPREP_INVALID
When called scsi_prep_fn return BLKPREP_INVALID, we should use the same code with BLKPREP_KILL in scsi_prep_return. Signed-off-by: Yiwen Jiang <jiangyiwen@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/scsi_lib.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index fa6b2c4eb7a2..8c6e31874171 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1344,6 +1344,7 @@ scsi_prep_return(struct request_queue *q, struct request *req, int ret)
switch (ret) {
case BLKPREP_KILL:
+ case BLKPREP_INVALID:
req->errors = DID_NO_CONNECT << 16;
/* release the command and kill it */
if (req->special) {