Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 948423e5 authored by Peter Osterlund's avatar Peter Osterlund Committed by Linus Torvalds
Browse files

[PATCH] pktcdvd: Don't unlock the door if the disc is in use



Unlocking the door when the disc is in use is obviously not good, because then
it's possible to eject the disc at the wrong time and cause severe disc data
corruption.

Signed-off-by: default avatarPeter Osterlund <petero2@telia.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 01fd9fda
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2435,6 +2435,7 @@ static int pkt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, u
		 * 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);