diff options
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/pktcdvd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index edf6bf29002e..89d8fe014efa 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c | |||
@@ -2435,7 +2435,8 @@ static int pkt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, u | |||
2435 | * The door gets locked when the device is opened, so we | 2435 | * The door gets locked when the device is opened, so we |
2436 | * have to unlock it or else the eject command fails. | 2436 | * have to unlock it or else the eject command fails. |
2437 | */ | 2437 | */ |
2438 | pkt_lock_door(pd, 0); | 2438 | if (pd->refcnt == 1) |
2439 | pkt_lock_door(pd, 0); | ||
2439 | return blkdev_ioctl(pd->bdev->bd_inode, file, cmd, arg); | 2440 | return blkdev_ioctl(pd->bdev->bd_inode, file, cmd, arg); |
2440 | 2441 | ||
2441 | default: | 2442 | default: |