Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ide: don't acquire queue_lock in ide_complete_pm_rq

blk_mq_stop_hw_queues doesn't need any locking, and the ide
dev_flags field isn't protected by it either.

Reviewed-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Christoph Hellwig and committed by
Jens Axboe
f0484273 b2101f65

-3
-3
drivers/ide/ide-pm.c
··· 201 201 { 202 202 struct request_queue *q = drive->queue; 203 203 struct ide_pm_state *pm = ide_req(rq)->special; 204 - unsigned long flags; 205 204 206 205 ide_complete_power_step(drive, rq); 207 206 if (pm->pm_step != IDE_PM_COMPLETED) ··· 210 211 printk("%s: completing PM request, %s\n", drive->name, 211 212 (ide_req(rq)->type == ATA_PRIV_PM_SUSPEND) ? "suspend" : "resume"); 212 213 #endif 213 - spin_lock_irqsave(&q->queue_lock, flags); 214 214 if (ide_req(rq)->type == ATA_PRIV_PM_SUSPEND) 215 215 blk_mq_stop_hw_queues(q); 216 216 else 217 217 drive->dev_flags &= ~IDE_DFLAG_BLOCKED; 218 - spin_unlock_irqrestore(&q->queue_lock, flags); 219 218 220 219 drive->hwif->rq = NULL; 221 220