diff options
Diffstat (limited to 'drivers/cdrom/viocd.c')
-rw-r--r-- | drivers/cdrom/viocd.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/cdrom/viocd.c b/drivers/cdrom/viocd.c index 16dada0627e..56bf9f44700 100644 --- a/drivers/cdrom/viocd.c +++ b/drivers/cdrom/viocd.c | |||
@@ -154,13 +154,21 @@ static const struct file_operations proc_viocd_operations = { | |||
154 | static int viocd_blk_open(struct block_device *bdev, fmode_t mode) | 154 | static int viocd_blk_open(struct block_device *bdev, fmode_t mode) |
155 | { | 155 | { |
156 | struct disk_info *di = bdev->bd_disk->private_data; | 156 | struct disk_info *di = bdev->bd_disk->private_data; |
157 | return cdrom_open(&di->viocd_info, bdev, mode); | 157 | int ret; |
158 | |||
159 | lock_kernel(); | ||
160 | ret = cdrom_open(&di->viocd_info, bdev, mode); | ||
161 | unlock_kernel(); | ||
162 | |||
163 | return ret; | ||
158 | } | 164 | } |
159 | 165 | ||
160 | static int viocd_blk_release(struct gendisk *disk, fmode_t mode) | 166 | static int viocd_blk_release(struct gendisk *disk, fmode_t mode) |
161 | { | 167 | { |
162 | struct disk_info *di = disk->private_data; | 168 | struct disk_info *di = disk->private_data; |
169 | lock_kernel(); | ||
163 | cdrom_release(&di->viocd_info, mode); | 170 | cdrom_release(&di->viocd_info, mode); |
171 | unlock_kernel(); | ||
164 | return 0; | 172 | return 0; |
165 | } | 173 | } |
166 | 174 | ||