Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e1cd3911 authored by jiangyiwen's avatar jiangyiwen Committed by Martin K. Petersen
Browse files

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: default avatarYiwen Jiang <jiangyiwen@huawei.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 84e54c46
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -1344,6 +1344,7 @@ scsi_prep_return(struct request_queue *q, struct request *req, int ret)


	switch (ret) {
	switch (ret) {
	case BLKPREP_KILL:
	case BLKPREP_KILL:
	case BLKPREP_INVALID:
		req->errors = DID_NO_CONNECT << 16;
		req->errors = DID_NO_CONNECT << 16;
		/* release the command and kill it */
		/* release the command and kill it */
		if (req->special) {
		if (req->special) {