dm ioctl: use nonseekable_open
authorArnd Bergmann <arnd@relay.de.ibm.com>
Thu, 12 Aug 2010 03:13:57 +0000 (04:13 +0100)
committerAlasdair G Kergon <agk@redhat.com>
Thu, 12 Aug 2010 03:13:57 +0000 (04:13 +0100)
The dm control device does not implement read/write, so it has no use for
seeking.  Using no_llseek prevents falling back to default_llseek, which
requires the BKL.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm-ioctl.c

index feb64d65fbfb93cc38e142edcd9b682af502ff0d..3fd8f0e169e72a85eb388cdc537a79dd423c319f 100644 (file)
@@ -1602,6 +1602,7 @@ static long dm_compat_ctl_ioctl(struct file *file, uint command, ulong u)
 #endif
 
 static const struct file_operations _ctl_fops = {
+       .open = nonseekable_open,
        .unlocked_ioctl  = dm_ctl_ioctl,
        .compat_ioctl = dm_compat_ctl_ioctl,
        .owner   = THIS_MODULE,
This page took 0.029176 seconds and 5 git commands to generate.