From 267db27ddc71c2fe21c4c56fb53dd0e12946f738 Mon Sep 17 00:00:00 2001 From: Erez Zadok Date: Fri, 24 Sep 2010 02:27:44 -0400 Subject: [PATCH] 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 --- fs/unionfs/commonfops.c | 6 +++--- fs/unionfs/file.c | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) 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, -- 2.34.1