Re: [PATCH] scsi: core: move scsi_host_busy() out of host lock for waking up EH handler

Bart Van Assche
2024-01-23T15:23:28Z

On 1/11/24 23:00, Ming Lei wrote:
> @@ -87,8 +87,10 @@ void scsi_schedule_eh(struct Scsi_Host *shost)
>
> if (scsi_host_set_state(shost, SHOST_RECOVERY) == 0 ||
> scsi_host_set_state(shost, SHOST_CANCEL_RECOVERY) == 0) {
> + unsigned int busy = scsi_host_busy(shost);
> +
> shost->host_eh_scheduled++;
> - scsi_eh_wakeup(shost);
> + scsi_eh_wakeup(shost, busy);
> }

No new variable is needed here. If this patch is reposted, please change
the above into the following:

+ scsi_eh_wakeup(shost, scsi_host_busy(shost));

With or without that additional change:

Reviewed-by: Bart Van Assche <bvanassche@acm.org>