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/ide/ide-floppy_ioctl.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/ide/ide-floppy_ioctl.c')
-rw-r--r-- | drivers/ide/ide-floppy_ioctl.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/ide/ide-floppy_ioctl.c b/drivers/ide/ide-floppy_ioctl.c index 9c2288234dea..fd3d05ab3417 100644 --- a/drivers/ide/ide-floppy_ioctl.c +++ b/drivers/ide/ide-floppy_ioctl.c | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/kernel.h> | 5 | #include <linux/kernel.h> |
6 | #include <linux/ide.h> | 6 | #include <linux/ide.h> |
7 | #include <linux/cdrom.h> | 7 | #include <linux/cdrom.h> |
8 | #include <linux/smp_lock.h> | ||
8 | 9 | ||
9 | #include <asm/unaligned.h> | 10 | #include <asm/unaligned.h> |
10 | 11 | ||
@@ -275,12 +276,15 @@ int ide_floppy_ioctl(ide_drive_t *drive, struct block_device *bdev, | |||
275 | void __user *argp = (void __user *)arg; | 276 | void __user *argp = (void __user *)arg; |
276 | int err; | 277 | int err; |
277 | 278 | ||
278 | if (cmd == CDROMEJECT || cmd == CDROM_LOCKDOOR) | 279 | lock_kernel(); |
279 | return ide_floppy_lockdoor(drive, &pc, arg, cmd); | 280 | if (cmd == CDROMEJECT || cmd == CDROM_LOCKDOOR) { |
281 | err = ide_floppy_lockdoor(drive, &pc, arg, cmd); | ||
282 | goto out; | ||
283 | } | ||
280 | 284 | ||
281 | err = ide_floppy_format_ioctl(drive, &pc, mode, cmd, argp); | 285 | err = ide_floppy_format_ioctl(drive, &pc, mode, cmd, argp); |
282 | if (err != -ENOTTY) | 286 | if (err != -ENOTTY) |
283 | return err; | 287 | goto out; |
284 | 288 | ||
285 | /* | 289 | /* |
286 | * skip SCSI_IOCTL_SEND_COMMAND (deprecated) | 290 | * skip SCSI_IOCTL_SEND_COMMAND (deprecated) |
@@ -293,5 +297,7 @@ int ide_floppy_ioctl(ide_drive_t *drive, struct block_device *bdev, | |||
293 | if (err == -ENOTTY) | 297 | if (err == -ENOTTY) |
294 | err = generic_ide_ioctl(drive, bdev, cmd, arg); | 298 | err = generic_ide_ioctl(drive, bdev, cmd, arg); |
295 | 299 | ||
300 | out: | ||
301 | unlock_kernel(); | ||
296 | return err; | 302 | return err; |
297 | } | 303 | } |