diff options
Diffstat (limited to 'drivers/ide/ide-cd.c')
-rw-r--r-- | drivers/ide/ide-cd.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index ac607bbde45c..692fd4570df6 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -424,16 +424,17 @@ static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret) | |||
424 | if (time_after(jiffies, info->write_timeout)) | 424 | if (time_after(jiffies, info->write_timeout)) |
425 | do_end_request = 1; | 425 | do_end_request = 1; |
426 | else { | 426 | else { |
427 | struct request_queue *q = drive->queue; | ||
427 | unsigned long flags; | 428 | unsigned long flags; |
428 | 429 | ||
429 | /* | 430 | /* |
430 | * take a breather relying on the unplug | 431 | * take a breather relying on the unplug |
431 | * timer to kick us again | 432 | * timer to kick us again |
432 | */ | 433 | */ |
433 | spin_lock_irqsave(&ide_lock, flags); | 434 | spin_lock_irqsave(q->queue_lock, flags); |
434 | blk_plug_device(drive->queue); | 435 | blk_plug_device(q); |
435 | spin_unlock_irqrestore(&ide_lock, | 436 | spin_unlock_irqrestore(q->queue_lock, flags); |
436 | flags); | 437 | |
437 | return 1; | 438 | return 1; |
438 | } | 439 | } |
439 | } | 440 | } |
@@ -502,11 +503,12 @@ static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret) | |||
502 | 503 | ||
503 | end_request: | 504 | end_request: |
504 | if (stat & ATA_ERR) { | 505 | if (stat & ATA_ERR) { |
506 | struct request_queue *q = drive->queue; | ||
505 | unsigned long flags; | 507 | unsigned long flags; |
506 | 508 | ||
507 | spin_lock_irqsave(&ide_lock, flags); | 509 | spin_lock_irqsave(q->queue_lock, flags); |
508 | blkdev_dequeue_request(rq); | 510 | blkdev_dequeue_request(rq); |
509 | spin_unlock_irqrestore(&ide_lock, flags); | 511 | spin_unlock_irqrestore(q->queue_lock, flags); |
510 | 512 | ||
511 | hwgroup->rq = NULL; | 513 | hwgroup->rq = NULL; |
512 | 514 | ||