diff options
Diffstat (limited to 'drivers/cdrom/viocd.c')
-rw-r--r-- | drivers/cdrom/viocd.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/cdrom/viocd.c b/drivers/cdrom/viocd.c index 1fa6628d150b..16dada0627ee 100644 --- a/drivers/cdrom/viocd.c +++ b/drivers/cdrom/viocd.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/module.h> | 42 | #include <linux/module.h> |
43 | #include <linux/completion.h> | 43 | #include <linux/completion.h> |
44 | #include <linux/proc_fs.h> | 44 | #include <linux/proc_fs.h> |
45 | #include <linux/smp_lock.h> | ||
45 | #include <linux/seq_file.h> | 46 | #include <linux/seq_file.h> |
46 | #include <linux/scatterlist.h> | 47 | #include <linux/scatterlist.h> |
47 | 48 | ||
@@ -167,7 +168,13 @@ static int viocd_blk_ioctl(struct block_device *bdev, fmode_t mode, | |||
167 | unsigned cmd, unsigned long arg) | 168 | unsigned cmd, unsigned long arg) |
168 | { | 169 | { |
169 | struct disk_info *di = bdev->bd_disk->private_data; | 170 | struct disk_info *di = bdev->bd_disk->private_data; |
170 | return cdrom_ioctl(&di->viocd_info, bdev, mode, cmd, arg); | 171 | int ret; |
172 | |||
173 | lock_kernel(); | ||
174 | ret = cdrom_ioctl(&di->viocd_info, bdev, mode, cmd, arg); | ||
175 | unlock_kernel(); | ||
176 | |||
177 | return ret; | ||
171 | } | 178 | } |
172 | 179 | ||
173 | static int viocd_blk_media_changed(struct gendisk *disk) | 180 | static int viocd_blk_media_changed(struct gendisk *disk) |
@@ -180,7 +187,7 @@ static const struct block_device_operations viocd_fops = { | |||
180 | .owner = THIS_MODULE, | 187 | .owner = THIS_MODULE, |
181 | .open = viocd_blk_open, | 188 | .open = viocd_blk_open, |
182 | .release = viocd_blk_release, | 189 | .release = viocd_blk_release, |
183 | .locked_ioctl = viocd_blk_ioctl, | 190 | .ioctl = viocd_blk_ioctl, |
184 | .media_changed = viocd_blk_media_changed, | 191 | .media_changed = viocd_blk_media_changed, |
185 | }; | 192 | }; |
186 | 193 | ||