diff options
author | Chris Metcalf <cmetcalf@tilera.com> | 2010-08-06 18:37:02 +0400 |
---|---|---|
committer | Chris Metcalf <cmetcalf@tilera.com> | 2010-08-06 18:37:02 +0400 |
commit | ab11b487402f97975f3ac1eeea09c82f4431481e (patch) | |
tree | 86337c5cbbd2b0c4bd07c0847a1dc7de3d898147 /net/wanrouter/wanproc.c | |
parent | 1c689cbcf2c2b7a35cd237abddd9206bb1b6fee1 (diff) | |
parent | fc1caf6eafb30ea185720e29f7f5eccca61ecd60 (diff) | |
download | linux-ab11b487402f97975f3ac1eeea09c82f4431481e.tar.xz |
Merge branch 'master' into for-linus
Diffstat (limited to 'net/wanrouter/wanproc.c')
-rw-r--r-- | net/wanrouter/wanproc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/wanrouter/wanproc.c b/net/wanrouter/wanproc.c index c44d96b3a437..11f25c7a7a05 100644 --- a/net/wanrouter/wanproc.c +++ b/net/wanrouter/wanproc.c @@ -27,7 +27,7 @@ #include <linux/module.h> #include <linux/wanrouter.h> /* WAN router API definitions */ #include <linux/seq_file.h> -#include <linux/smp_lock.h> +#include <linux/mutex.h> #include <net/net_namespace.h> #include <asm/io.h> @@ -66,6 +66,7 @@ * /proc/net/router */ +static DEFINE_MUTEX(config_mutex); static struct proc_dir_entry *proc_router; /* Strings */ @@ -85,7 +86,7 @@ static void *r_start(struct seq_file *m, loff_t *pos) struct wan_device *wandev; loff_t l = *pos; - lock_kernel(); + mutex_lock(&config_mutex); if (!l--) return SEQ_START_TOKEN; for (wandev = wanrouter_router_devlist; l-- && wandev; @@ -104,7 +105,7 @@ static void *r_next(struct seq_file *m, void *v, loff_t *pos) static void r_stop(struct seq_file *m, void *v) __releases(kernel_lock) { - unlock_kernel(); + mutex_unlock(&config_mutex); } static int config_show(struct seq_file *m, void *v) |