diff options
Diffstat (limited to 'drivers/block/swim.c')
-rw-r--r-- | drivers/block/swim.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/block/swim.c b/drivers/block/swim.c index e463657569ff..f04f74e3758f 100644 --- a/drivers/block/swim.c +++ b/drivers/block/swim.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/fd.h> | 20 | #include <linux/fd.h> |
21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
22 | #include <linux/blkdev.h> | 22 | #include <linux/blkdev.h> |
23 | #include <linux/smp_lock.h> | ||
23 | #include <linux/hdreg.h> | 24 | #include <linux/hdreg.h> |
24 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
25 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
@@ -690,7 +691,9 @@ static int floppy_ioctl(struct block_device *bdev, fmode_t mode, | |||
690 | case FDEJECT: | 691 | case FDEJECT: |
691 | if (fs->ref_count != 1) | 692 | if (fs->ref_count != 1) |
692 | return -EBUSY; | 693 | return -EBUSY; |
694 | lock_kernel(); | ||
693 | err = floppy_eject(fs); | 695 | err = floppy_eject(fs); |
696 | unlock_kernel(); | ||
694 | return err; | 697 | return err; |
695 | 698 | ||
696 | case FDGETPRM: | 699 | case FDGETPRM: |
@@ -753,7 +756,7 @@ static const struct block_device_operations floppy_fops = { | |||
753 | .owner = THIS_MODULE, | 756 | .owner = THIS_MODULE, |
754 | .open = floppy_open, | 757 | .open = floppy_open, |
755 | .release = floppy_release, | 758 | .release = floppy_release, |
756 | .locked_ioctl = floppy_ioctl, | 759 | .ioctl = floppy_ioctl, |
757 | .getgeo = floppy_getgeo, | 760 | .getgeo = floppy_getgeo, |
758 | .media_changed = floppy_check_change, | 761 | .media_changed = floppy_check_change, |
759 | .revalidate_disk = floppy_revalidate, | 762 | .revalidate_disk = floppy_revalidate, |