We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a33a502 commit 13c28beCopy full SHA for 13c28be
drivers/ufs/core/ufshcd.c
@@ -3041,16 +3041,7 @@ static int ufshcd_compose_dev_cmd(struct ufs_hba *hba,
3041
*/
3042
bool ufshcd_cmd_inflight(struct scsi_cmnd *cmd)
3043
{
3044
- struct request *rq;
3045
-
3046
- if (!cmd)
3047
- return false;
3048
3049
- rq = scsi_cmd_to_rq(cmd);
3050
- if (!blk_mq_request_started(rq))
3051
3052
3053
- return true;
+ return cmd && blk_mq_rq_state(scsi_cmd_to_rq(cmd)) == MQ_RQ_IN_FLIGHT;
3054
}
3055
3056
/*
0 commit comments