Re: [PATCH v3 7/7] scsi: ufs: core: Do not release a reserved request in ufshcd_abort()
From: Bart Van Assche
Date: Tue Oct 20 2026 - 16:21:41 EST
On 10/20/26 1:21 AM, Stanley Jhu wrote:
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index ee898f4a5bb1..5d1a9b4e9b8d 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -8228,7 +8228,8 @@ static int ufshcd_abort(struct scsi_cmnd *cmd)
* Clear the corresponding bit from outstanding_reqs since the command
* has been aborted successfully.
*/
- if (ufshcd_clear_outstanding_reqs(hba, BIT(tag)))
+ if (ufshcd_clear_outstanding_reqs(hba, BIT(tag)) &&
+ ufshcd_is_scsi_cmd(cmd))
ufshcd_release_scsi_cmd(hba, cmd);
err = SUCCESS;
Reviewed-by: Bart Van Assche <bvanassche@xxxxxxx>