Old ->ioctl was split into ->unlocked_ioctl and ->compat_ioctl. Compat
version doesn't need to lock_kernel any longer.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
goto out;
if (lower_file->f_op->unlocked_ioctl) {
err = lower_file->f_op->unlocked_ioctl(lower_file, cmd, arg);
+#ifdef CONFIG_COMPAT
} else if (lower_file->f_op->ioctl) {
- lock_kernel();
- err = lower_file->f_op->ioctl(
+ err = lower_file->f_op->compat_ioctl(
lower_file->f_path.dentry->d_inode,
lower_file, cmd, arg);
- unlock_kernel();
+#endif
}
out:
.write = unionfs_write,
.readdir = unionfs_file_readdir,
.unlocked_ioctl = unionfs_ioctl,
+#ifdef CONFIG_COMPAT
+ .compat_ioctl = unionfs_ioctl,
+#endif
.mmap = unionfs_mmap,
.open = unionfs_open,
.flush = unionfs_flush,