Commit 3948b6f2 authored by Tejun Heo's avatar Tejun Heo

libata: fix unbalanced spin_lock_irqsave/spin_unlock_irq() in ata_scsi_park_show()

ata_scsi_park_show() was pairing spin_lock_irqsave() with
spin_unlock_irq().  As the function is always called with irq enabled,
it didn't actually break anything.  Use spin_lock_irq() instead.
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Cc: Elias Oltmanns <eo@nebensachen.de>
parent a2127e40
...@@ -174,13 +174,13 @@ static ssize_t ata_scsi_park_show(struct device *device, ...@@ -174,13 +174,13 @@ static ssize_t ata_scsi_park_show(struct device *device,
struct ata_port *ap; struct ata_port *ap;
struct ata_link *link; struct ata_link *link;
struct ata_device *dev; struct ata_device *dev;
unsigned long flags, now; unsigned long now;
unsigned int uninitialized_var(msecs); unsigned int uninitialized_var(msecs);
int rc = 0; int rc = 0;
ap = ata_shost_to_port(sdev->host); ap = ata_shost_to_port(sdev->host);
spin_lock_irqsave(ap->lock, flags); spin_lock_irq(ap->lock);
dev = ata_scsi_find_dev(ap, sdev); dev = ata_scsi_find_dev(ap, sdev);
if (!dev) { if (!dev) {
rc = -ENODEV; rc = -ENODEV;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment