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

Commit beb07c1a authored by Tejun Heo's avatar Tejun Heo Committed by Jeff Garzik
Browse files

[PATCH] libata: clear EH action on device detach



Clear related EH action on device detach such that new device doesn't
receive EH actions scheduled for the old one.

Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 64f65ca6
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -734,6 +734,10 @@ static void ata_eh_detach_dev(struct ata_device *dev)
		ap->flags |= ATA_FLAG_SCSI_HOTPLUG;
	}

	/* clear per-dev EH actions */
	ata_eh_clear_action(dev, &ap->eh_info, ATA_EH_PERDEV_MASK);
	ata_eh_clear_action(dev, &ap->eh_context.i, ATA_EH_PERDEV_MASK);

	spin_unlock_irqrestore(ap->lock, flags);
}