diff options
Diffstat (limited to 'drivers/block/paride/pd.c')
-rw-r--r-- | drivers/block/paride/pd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/block/paride/pd.c b/drivers/block/paride/pd.c index 4e8b9bff3abe..c4d6ed9846ca 100644 --- a/drivers/block/paride/pd.c +++ b/drivers/block/paride/pd.c | |||
@@ -153,6 +153,7 @@ enum {D_PRT, D_PRO, D_UNI, D_MOD, D_GEO, D_SBY, D_DLY, D_SLV}; | |||
153 | #include <linux/blkdev.h> | 153 | #include <linux/blkdev.h> |
154 | #include <linux/blkpg.h> | 154 | #include <linux/blkpg.h> |
155 | #include <linux/kernel.h> | 155 | #include <linux/kernel.h> |
156 | #include <linux/smp_lock.h> | ||
156 | #include <asm/uaccess.h> | 157 | #include <asm/uaccess.h> |
157 | #include <linux/workqueue.h> | 158 | #include <linux/workqueue.h> |
158 | 159 | ||
@@ -768,8 +769,10 @@ static int pd_ioctl(struct block_device *bdev, fmode_t mode, | |||
768 | 769 | ||
769 | switch (cmd) { | 770 | switch (cmd) { |
770 | case CDROMEJECT: | 771 | case CDROMEJECT: |
772 | lock_kernel(); | ||
771 | if (disk->access == 1) | 773 | if (disk->access == 1) |
772 | pd_special_command(disk, pd_eject); | 774 | pd_special_command(disk, pd_eject); |
775 | unlock_kernel(); | ||
773 | return 0; | 776 | return 0; |
774 | default: | 777 | default: |
775 | return -EINVAL; | 778 | return -EINVAL; |
@@ -812,7 +815,7 @@ static const struct block_device_operations pd_fops = { | |||
812 | .owner = THIS_MODULE, | 815 | .owner = THIS_MODULE, |
813 | .open = pd_open, | 816 | .open = pd_open, |
814 | .release = pd_release, | 817 | .release = pd_release, |
815 | .locked_ioctl = pd_ioctl, | 818 | .ioctl = pd_ioctl, |
816 | .getgeo = pd_getgeo, | 819 | .getgeo = pd_getgeo, |
817 | .media_changed = pd_check_media, | 820 | .media_changed = pd_check_media, |
818 | .revalidate_disk= pd_revalidate | 821 | .revalidate_disk= pd_revalidate |