Skip to content

Commit 28afe01

Browse files
committed
ata: libata-eh: queue hotplug work on the system_dfl_long_wq workqueue
ata_scsi_port_error_handler() uses schedule_delayed_work() to queue the ap->hotplug_task work. schedule_delayed_work() always uses the system_percpu_wq per-cpu workqueue. ata_scsi_scan_host() queues the ap->hotplug_task work on the unbound system_dfl_long_wq workqueue. It seems counter-intuitive to queue the same work on two different workqueues. Thus, change ata_scsi_port_error_handler() to also queue the ap->hotplug_task work on the system_dfl_long_wq workqueue, such that the work is always queued on the same workqueue. Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Signed-off-by: Niklas Cassel <cassel@kernel.org>
1 parent 5e46e03 commit 28afe01

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/ata/libata-eh.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@ void ata_scsi_port_error_handler(struct Scsi_Host *host, struct ata_port *ap)
819819
ap->pflags &= ~ATA_PFLAG_LOADING;
820820
else if ((ap->pflags & ATA_PFLAG_SCSI_HOTPLUG) &&
821821
!(ap->flags & ATA_FLAG_SAS_HOST))
822-
schedule_delayed_work(&ap->hotplug_task, 0);
822+
queue_delayed_work(system_dfl_long_wq, &ap->hotplug_task, 0);
823823

824824
if (ap->pflags & ATA_PFLAG_RECOVERED)
825825
ata_port_info(ap, "EH complete\n");

0 commit comments

Comments
 (0)