diff options
author | Arnd Bergmann <arnd@arndb.de> | 2010-07-08 10:18:46 +0200 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2010-08-07 18:25:00 +0200 |
commit | 8a6cfeb6deca3a8fefd639d898b0d163c0b5d368 (patch) | |
tree | 9a633ad48c3b1ada0519ee7bade0602f940037f6 /drivers/block/swim.c | |
parent | 34484062445fe905bf02c72f87ddda21881acda3 (diff) | |
download | linux-3.10-8a6cfeb6deca3a8fefd639d898b0d163c0b5d368.tar.gz linux-3.10-8a6cfeb6deca3a8fefd639d898b0d163c0b5d368.tar.bz2 linux-3.10-8a6cfeb6deca3a8fefd639d898b0d163c0b5d368.zip |
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 e463657569f..f04f74e3758 100644 --- a/drivers/block/swim.c +++ b/drivers/block/swim.c @@ -20,6 +20,7 @@ #include <linux/fd.h> #include <linux/slab.h> #include <linux/blkdev.h> +#include <linux/smp_lock.h> #include <linux/hdreg.h> #include <linux/kernel.h> #include <linux/delay.h> @@ -690,7 +691,9 @@ static int floppy_ioctl(struct block_device *bdev, fmode_t mode, case FDEJECT: if (fs->ref_count != 1) return -EBUSY; + lock_kernel(); err = floppy_eject(fs); + unlock_kernel(); return err; case FDGETPRM: @@ -753,7 +756,7 @@ static const struct block_device_operations floppy_fops = { .owner = THIS_MODULE, .open = floppy_open, .release = floppy_release, - .locked_ioctl = floppy_ioctl, + .ioctl = floppy_ioctl, .getgeo = floppy_getgeo, .media_changed = floppy_check_change, .revalidate_disk = floppy_revalidate, |