From c04f57c597cdaee1ebb1f1a3dc23348cc5d56993 Mon Sep 17 00:00:00 2001 From: hadaq Date: Wed, 7 Mar 2012 02:12:50 +0000 Subject: [PATCH] mutex update for kernel >3.XX --- pexor/kernel-module/pexor_trb.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pexor/kernel-module/pexor_trb.c b/pexor/kernel-module/pexor_trb.c index 8ab5747..607542f 100644 --- a/pexor/kernel-module/pexor_trb.c +++ b/pexor/kernel-module/pexor_trb.c @@ -8,7 +8,8 @@ #include #include #include -#include +//#include +//#include #include #include @@ -864,15 +865,21 @@ int pexor_ioctl_write_register(struct pexor_privdata *priv, unsigned long arg) return retval; } + +DEFINE_MUTEX(fs_mutex); + + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) long pexor_unlocked_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) { long ret; - lock_kernel(); + mutex_lock(&fs_mutex); + ret = pexor_ioctl(filp->f_path.dentry->d_inode, filp, cmd, arg); - unlock_kernel(); + + mutex_unlock(&fs_mutex); return ret; } -- 2.43.0