summaryrefslogtreecommitdiffstats
path: root/fs/ioctl.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2010-07-04 00:15:10 +0200
committerFrederic Weisbecker <fweisbec@gmail.com>2010-08-14 00:24:24 +0200
commitb19dd42faf413b4705d4adb38521e82d73fa4249 (patch)
treefbfdea065c3772b2de2c37238af6afcad2e42934 /fs/ioctl.c
parentc6d7ba8b12636923f3e30997dec69bed58e176b6 (diff)
downloadop-kernel-dev-b19dd42faf413b4705d4adb38521e82d73fa4249.zip
op-kernel-dev-b19dd42faf413b4705d4adb38521e82d73fa4249.tar.gz
bkl: Remove locked .ioctl file operation
The last user is gone, so we can safely remove this Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: John Kacur <jkacur@redhat.com> Cc: Al Viro <viro@ZenIV.linux.org.uk> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'fs/ioctl.c')
-rw-r--r--fs/ioctl.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/fs/ioctl.c b/fs/ioctl.c
index 2d140a7..f855ea4 100644
--- a/fs/ioctl.c
+++ b/fs/ioctl.c
@@ -29,7 +29,6 @@
* @arg: command-specific argument for ioctl
*
* Invokes filesystem specific ->unlocked_ioctl, if one exists; otherwise
- * invokes filesystem specific ->ioctl method. If neither method exists,
* returns -ENOTTY.
*
* Returns 0 on success, -errno on error.
@@ -39,21 +38,12 @@ static long vfs_ioctl(struct file *filp, unsigned int cmd,
{
int error = -ENOTTY;
- if (!filp->f_op)
+ if (!filp->f_op || !filp->f_op->unlocked_ioctl)
goto out;
- if (filp->f_op->unlocked_ioctl) {
- error = filp->f_op->unlocked_ioctl(filp, cmd, arg);
- if (error == -ENOIOCTLCMD)
- error = -EINVAL;
- goto out;
- } else if (filp->f_op->ioctl) {
- lock_kernel();
- error = filp->f_op->ioctl(filp->f_path.dentry->d_inode,
- filp, cmd, arg);
- unlock_kernel();
- }
-
+ error = filp->f_op->unlocked_ioctl(filp, cmd, arg);
+ if (error == -ENOIOCTLCMD)
+ error = -EINVAL;
out:
return error;
}
OpenPOWER on IntegriCloud