diff options
author | Arnd Bergmann <arnd@arndb.de> | 2010-07-08 04:18:46 -0400 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2010-08-07 12:25:00 -0400 |
commit | 8a6cfeb6deca3a8fefd639d898b0d163c0b5d368 (patch) | |
tree | 9a633ad48c3b1ada0519ee7bade0602f940037f6 /drivers/block/swim.c | |
parent | 34484062445fe905bf02c72f87ddda21881acda3 (diff) |
block: push down BKL into .locked_ioctl
As a preparation for the removal of the big kernel
lock in the block layer, this removes the BKL
from the common ioctl handling code, moving it
into every single driver still using it.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
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, |