Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 117501
b: refs/heads/master
c: a0eb62a
h: refs/heads/master
i:
  117499: 7003ced
v: v3
  • Loading branch information
Al Viro committed Oct 21, 2008
1 parent 6f0c98a commit 91d7729
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bbc1cc978404105da23d505163ce9fd5598ed5b1
refs/heads/master: a0eb62a0a4470fef5a5f41e7f1442fdd667220ef
20 changes: 10 additions & 10 deletions trunk/drivers/block/pktcdvd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2803,6 +2803,14 @@ static int pkt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, u
VPRINTK("pkt_ioctl: cmd %x, dev %d:%d\n", cmd, imajor(inode), iminor(inode));

switch (cmd) {
case CDROMEJECT:
/*
* The door gets locked when the device is opened, so we
* have to unlock it or else the eject command fails.
*/
if (pd->refcnt == 1)
pkt_lock_door(pd, 0);
/* fallthru */
/*
* forward selected CDROM ioctls to CD-ROM, for UDF
*/
Expand All @@ -2811,16 +2819,8 @@ static int pkt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, u
case CDROM_LAST_WRITTEN:
case CDROM_SEND_PACKET:
case SCSI_IOCTL_SEND_COMMAND:
return blkdev_ioctl(pd->bdev->bd_inode, file, cmd, arg);

case CDROMEJECT:
/*
* The door gets locked when the device is opened, so we
* have to unlock it or else the eject command fails.
*/
if (pd->refcnt == 1)
pkt_lock_door(pd, 0);
return blkdev_ioctl(pd->bdev->bd_inode, file, cmd, arg);
return blkdev_driver_ioctl(pd->bdev->bd_inode, pd->bdev->bd_disk,
file, cmd, arg);

default:
VPRINTK(DRIVER_NAME": Unknown ioctl for %s (%x)\n", pd->name, cmd);
Expand Down

0 comments on commit 91d7729

Please sign in to comment.