From: Erez Zadok Date: Fri, 24 Sep 2010 06:27:44 +0000 (-0400) Subject: Unionfs: support ->unlocked_ioctl and ->compat_ioctl X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=896ae640e6da6323d7862bc6b9d066b2ed2ab361;p=unionfs-3.13.y.git Unionfs: support ->unlocked_ioctl and ->compat_ioctl 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 --- diff --git a/fs/unionfs/commonfops.c b/fs/unionfs/commonfops.c index 740c4ade190..51ea65e82b4 100644 --- a/fs/unionfs/commonfops.c +++ b/fs/unionfs/commonfops.c @@ -739,12 +739,12 @@ static long do_ioctl(struct file *file, unsigned int cmd, unsigned long arg) 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: diff --git a/fs/unionfs/file.c b/fs/unionfs/file.c index 5a8f4e0774b..1c694c3737d 100644 --- a/fs/unionfs/file.c +++ b/fs/unionfs/file.c @@ -368,6 +368,9 @@ struct file_operations unionfs_main_fops = { .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,