block: remove BKL from partition ioctls
authorArnd Bergmann <arnd@arndb.de>
Wed, 7 Jul 2010 14:51:28 +0000 (16:51 +0200)
committerJens Axboe <jaxboe@fusionio.com>
Sat, 7 Aug 2010 16:26:08 +0000 (18:26 +0200)
The blkpg_ioctl and blkdev_reread_part access fields of
the bdev and gendisk structures, yet they always do so
under the protection of bdev->bd_mutex, which seems
sufficient.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
cked-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
block/ioctl.c

index 60f477c91eef0e76296bb4e53834333f714aca03..09fd7f1ef23a4ad3fefe2f7b4743d701c9764540 100644 (file)
@@ -296,14 +296,10 @@ int blkdev_ioctl(struct block_device *bdev, fmode_t mode, unsigned cmd,
                        bd_release(bdev);
                return ret;
        case BLKPG:
-               lock_kernel();
                ret = blkpg_ioctl(bdev, (struct blkpg_ioctl_arg __user *) arg);
-               unlock_kernel();
                break;
        case BLKRRPART:
-               lock_kernel();
                ret = blkdev_reread_part(bdev);
-               unlock_kernel();
                break;
        case BLKGETSIZE:
                size = bdev->bd_inode->i_size;