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>
This commit is contained in:

committed by
Jens Axboe

parent
3448406244
commit
8a6cfeb6de
@@ -1,6 +1,7 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/ide.h>
|
||||
#include <linux/hdreg.h>
|
||||
#include <linux/smp_lock.h>
|
||||
|
||||
#include "ide-disk.h"
|
||||
|
||||
@@ -18,9 +19,13 @@ int ide_disk_ioctl(ide_drive_t *drive, struct block_device *bdev, fmode_t mode,
|
||||
{
|
||||
int err;
|
||||
|
||||
lock_kernel();
|
||||
err = ide_setting_ioctl(drive, bdev, cmd, arg, ide_disk_ioctl_settings);
|
||||
if (err != -EOPNOTSUPP)
|
||||
return err;
|
||||
goto out;
|
||||
|
||||
return generic_ide_ioctl(drive, bdev, cmd, arg);
|
||||
err = generic_ide_ioctl(drive, bdev, cmd, arg);
|
||||
out:
|
||||
unlock_kernel();
|
||||
return err;
|
||||
}
|
||||
|
Reference in New Issue
Block a user