diff options
Diffstat (limited to 'drivers/cdrom/gdrom.c')
-rw-r--r-- | drivers/cdrom/gdrom.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/cdrom/gdrom.c b/drivers/cdrom/gdrom.c index 5219b57deb36..1772fd914fb9 100644 --- a/drivers/cdrom/gdrom.c +++ b/drivers/cdrom/gdrom.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/blkdev.h> | 34 | #include <linux/blkdev.h> |
35 | #include <linux/interrupt.h> | 35 | #include <linux/interrupt.h> |
36 | #include <linux/device.h> | 36 | #include <linux/device.h> |
37 | #include <linux/smp_lock.h> | ||
37 | #include <linux/wait.h> | 38 | #include <linux/wait.h> |
38 | #include <linux/workqueue.h> | 39 | #include <linux/workqueue.h> |
39 | #include <linux/platform_device.h> | 40 | #include <linux/platform_device.h> |
@@ -509,7 +510,13 @@ static int gdrom_bdops_mediachanged(struct gendisk *disk) | |||
509 | static int gdrom_bdops_ioctl(struct block_device *bdev, fmode_t mode, | 510 | static int gdrom_bdops_ioctl(struct block_device *bdev, fmode_t mode, |
510 | unsigned cmd, unsigned long arg) | 511 | unsigned cmd, unsigned long arg) |
511 | { | 512 | { |
512 | return cdrom_ioctl(gd.cd_info, bdev, mode, cmd, arg); | 513 | int ret; |
514 | |||
515 | lock_kernel(); | ||
516 | ret = cdrom_ioctl(gd.cd_info, bdev, mode, cmd, arg); | ||
517 | unlock_kernel(); | ||
518 | |||
519 | return ret; | ||
513 | } | 520 | } |
514 | 521 | ||
515 | static const struct block_device_operations gdrom_bdops = { | 522 | static const struct block_device_operations gdrom_bdops = { |
@@ -517,7 +524,7 @@ static const struct block_device_operations gdrom_bdops = { | |||
517 | .open = gdrom_bdops_open, | 524 | .open = gdrom_bdops_open, |
518 | .release = gdrom_bdops_release, | 525 | .release = gdrom_bdops_release, |
519 | .media_changed = gdrom_bdops_mediachanged, | 526 | .media_changed = gdrom_bdops_mediachanged, |
520 | .locked_ioctl = gdrom_bdops_ioctl, | 527 | .ioctl = gdrom_bdops_ioctl, |
521 | }; | 528 | }; |
522 | 529 | ||
523 | static irqreturn_t gdrom_command_interrupt(int irq, void *dev_id) | 530 | static irqreturn_t gdrom_command_interrupt(int irq, void *dev_id) |