diff options
Diffstat (limited to 'drivers/isdn/divert/divert_procfs.c')
-rw-r--r-- | drivers/isdn/divert/divert_procfs.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/isdn/divert/divert_procfs.c b/drivers/isdn/divert/divert_procfs.c index c53e2417e7d4..33ec9e467772 100644 --- a/drivers/isdn/divert/divert_procfs.c +++ b/drivers/isdn/divert/divert_procfs.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
21 | #include <linux/isdnif.h> | 21 | #include <linux/isdnif.h> |
22 | #include <net/net_namespace.h> | 22 | #include <net/net_namespace.h> |
23 | #include <linux/smp_lock.h> | 23 | #include <linux/mutex.h> |
24 | #include "isdn_divert.h" | 24 | #include "isdn_divert.h" |
25 | 25 | ||
26 | 26 | ||
@@ -28,6 +28,7 @@ | |||
28 | /* Variables for interface queue */ | 28 | /* Variables for interface queue */ |
29 | /*********************************/ | 29 | /*********************************/ |
30 | ulong if_used = 0; /* number of interface users */ | 30 | ulong if_used = 0; /* number of interface users */ |
31 | static DEFINE_MUTEX(isdn_divert_mutex); | ||
31 | static struct divert_info *divert_info_head = NULL; /* head of queue */ | 32 | static struct divert_info *divert_info_head = NULL; /* head of queue */ |
32 | static struct divert_info *divert_info_tail = NULL; /* pointer to last entry */ | 33 | static struct divert_info *divert_info_tail = NULL; /* pointer to last entry */ |
33 | static DEFINE_SPINLOCK(divert_info_lock);/* lock for queue */ | 34 | static DEFINE_SPINLOCK(divert_info_lock);/* lock for queue */ |
@@ -261,9 +262,9 @@ static long isdn_divert_ioctl(struct file *file, uint cmd, ulong arg) | |||
261 | { | 262 | { |
262 | long ret; | 263 | long ret; |
263 | 264 | ||
264 | lock_kernel(); | 265 | mutex_lock(&isdn_divert_mutex); |
265 | ret = isdn_divert_ioctl_unlocked(file, cmd, arg); | 266 | ret = isdn_divert_ioctl_unlocked(file, cmd, arg); |
266 | unlock_kernel(); | 267 | mutex_unlock(&isdn_divert_mutex); |
267 | 268 | ||
268 | return ret; | 269 | return ret; |
269 | } | 270 | } |