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/nbd.c | |
parent | 34484062445fe905bf02c72f87ddda21881acda3 (diff) | |
download | linux-8a6cfeb6deca3a8fefd639d898b0d163c0b5d368.tar.gz linux-8a6cfeb6deca3a8fefd639d898b0d163c0b5d368.tar.bz2 linux-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/nbd.c')
-rw-r--r-- | drivers/block/nbd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 2e74e7d475ca..6751789fb379 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -24,6 +24,7 @@ #include <linux/errno.h> #include <linux/file.h> #include <linux/ioctl.h> +#include <linux/smp_lock.h> #include <linux/compiler.h> #include <linux/err.h> #include <linux/kernel.h> @@ -716,9 +717,11 @@ static int nbd_ioctl(struct block_device *bdev, fmode_t mode, dprintk(DBG_IOCTL, "%s: nbd_ioctl cmd=%s(0x%x) arg=%lu\n", lo->disk->disk_name, ioctl_cmd_to_ascii(cmd), cmd, arg); + lock_kernel(); mutex_lock(&lo->tx_lock); error = __nbd_ioctl(bdev, lo, cmd, arg); mutex_unlock(&lo->tx_lock); + unlock_kernel(); return error; } @@ -726,7 +729,7 @@ static int nbd_ioctl(struct block_device *bdev, fmode_t mode, static const struct block_device_operations nbd_fops = { .owner = THIS_MODULE, - .locked_ioctl = nbd_ioctl, + .ioctl = nbd_ioctl, }; /* |