From: hadaq Date: Wed, 7 Mar 2012 02:12:50 +0000 (+0000) Subject: mutex update for kernel >3.XX X-Git-Tag: v6.0~57 X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=c04f57c597cdaee1ebb1f1a3dc23348cc5d56993;p=trbnettools.git mutex update for kernel >3.XX --- 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; }