*** vmmon-only/linux/driver.c.orig 2010-10-08 14:58:53.448000080 +0200 --- vmmon-only/linux/driver.c 2010-10-08 14:59:28.900000082 +0200 *************** *** 169,178 **** static int LinuxDriver_Ioctl(struct inode *inode, struct file *filp, u_int iocmd, unsigned long ioarg); ! #if defined(HAVE_UNLOCKED_IOCTL) || defined(HAVE_COMPAT_IOCTL) static long LinuxDriver_UnlockedIoctl(struct file *filp, u_int iocmd, unsigned long ioarg); ! #endif static int LinuxDriver_Close(struct inode *inode, struct file *filp); static unsigned int LinuxDriverPoll(struct file *file, poll_table *wait); --- 169,178 ---- static int LinuxDriver_Ioctl(struct inode *inode, struct file *filp, u_int iocmd, unsigned long ioarg); ! static long LinuxDriver_UnlockedIoctl(struct file *filp, u_int iocmd, unsigned long ioarg); ! static int LinuxDriver_Close(struct inode *inode, struct file *filp); static unsigned int LinuxDriverPoll(struct file *file, poll_table *wait); *************** *** 421,431 **** memset(&vmuser_fops, 0, sizeof vmuser_fops); compat_fop_set_owner(&vmuser_fops); vmuser_fops.poll = LinuxDriverPoll; - #ifdef VMW_HAVE_UNLOCKED_IOCTL vmuser_fops.unlocked_ioctl = LinuxDriver_UnlockedIoctl; - #else - vmuser_fops.ioctl = LinuxDriver_Ioctl; - #endif #ifdef HAVE_COMPAT_IOCTL vmuser_fops.compat_ioctl = LinuxDriver_UnlockedIoctl; #endif --- 421,427 ---- *************** *** 2411,2417 **** } ! #if defined(HAVE_UNLOCKED_IOCTL) || defined(HAVE_COMPAT_IOCTL) /* *----------------------------------------------------------------------------- * --- 2407,2413 ---- } ! /* *----------------------------------------------------------------------------- * *************** *** 2444,2450 **** unlock_kernel(); return err; } ! #endif /* --- 2440,2446 ---- unlock_kernel(); return err; } ! /* *** vmmon-only/linux/hostif.c.orig 2010-10-08 14:59:11.114000081 +0200 --- vmmon-only/linux/hostif.c 2010-10-08 14:59:39.204000081 +0200 *************** *** 3409,3427 **** u_int iocmd, unsigned long ioarg) { ! #ifdef HAVE_UNLOCKED_IOCTL if (filp->f_op->unlocked_ioctl) { return filp->f_op->unlocked_ioctl(filp, iocmd, ioarg); } - #endif - if (filp->f_op->ioctl) { - long err; - lock_kernel(); - err = filp->f_op->ioctl(filp->f_dentry->d_inode, filp, iocmd, ioarg); - unlock_kernel(); - return err; - } return -ENOIOCTLCMD; } --- 3409,3419 ---- u_int iocmd, unsigned long ioarg) { ! if (filp->f_op->unlocked_ioctl) { return filp->f_op->unlocked_ioctl(filp, iocmd, ioarg); } return -ENOIOCTLCMD; }