diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-13 17:52:35 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-13 17:52:35 -0700 |
commit | 10041d2d14688e207d0d829095147aa82c1f211b (patch) | |
tree | 57ef361d05e6bbffe3ec490ca9110878a6e969e2 /fs/ioctl.c | |
parent | 4914c7f881845367b9198631a014ab466329b9e5 (diff) | |
parent | b19dd42faf413b4705d4adb38521e82d73fa4249 (diff) | |
download | kernel_samsung_smdk4412-10041d2d14688e207d0d829095147aa82c1f211b.zip kernel_samsung_smdk4412-10041d2d14688e207d0d829095147aa82c1f211b.tar.gz kernel_samsung_smdk4412-10041d2d14688e207d0d829095147aa82c1f211b.tar.bz2 |
Merge branch 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing
* 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing:
bkl: Remove locked .ioctl file operation
v4l: Remove reference to bkl ioctl in compat ioctl handling
logfs: kill BKL
Diffstat (limited to 'fs/ioctl.c')
-rw-r--r-- | fs/ioctl.c | 18 |
1 files changed, 4 insertions, 14 deletions
@@ -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; } |