mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
bkl: Remove locked .ioctl file operation
The last user is gone, so we can safely remove this Signed-off-by: Arnd Bergmann <[email protected]> Cc: John Kacur <[email protected]> Cc: Al Viro <[email protected]> Cc: Thomas Gleixner <[email protected]> Signed-off-by: Frederic Weisbecker <[email protected]>
This commit is contained in:
parent
c6d7ba8b12
commit
b19dd42faf
7 changed files with 13 additions and 51 deletions
18
fs/ioctl.c
18
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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue