diff options
author | Arnd Bergmann <arnd@arndb.de> | 2008-05-20 13:17:01 -0400 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2008-07-02 17:06:26 -0400 |
commit | 3e0420f066c632e135939ccf218ae793e02dccd7 (patch) | |
tree | 64a0803cda185a704a8d44e831d195c0667708cc /drivers/s390/char/vmwatchdog.c | |
parent | 6c111d886317513605c459cbe8d1970fab732c90 (diff) |
vmwatchdog: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/s390/char/vmwatchdog.c')
-rw-r--r-- | drivers/s390/char/vmwatchdog.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/s390/char/vmwatchdog.c b/drivers/s390/char/vmwatchdog.c index 19f8389291b6..ee80e936d514 100644 --- a/drivers/s390/char/vmwatchdog.c +++ b/drivers/s390/char/vmwatchdog.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/moduleparam.h> | 14 | #include <linux/moduleparam.h> |
15 | #include <linux/watchdog.h> | 15 | #include <linux/watchdog.h> |
16 | #include <linux/smp_lock.h> | ||
16 | 17 | ||
17 | #include <asm/ebcdic.h> | 18 | #include <asm/ebcdic.h> |
18 | #include <asm/io.h> | 19 | #include <asm/io.h> |
@@ -131,11 +132,15 @@ static int __init vmwdt_probe(void) | |||
131 | static int vmwdt_open(struct inode *i, struct file *f) | 132 | static int vmwdt_open(struct inode *i, struct file *f) |
132 | { | 133 | { |
133 | int ret; | 134 | int ret; |
134 | if (test_and_set_bit(0, &vmwdt_is_open)) | 135 | lock_kernel(); |
136 | if (test_and_set_bit(0, &vmwdt_is_open)) { | ||
137 | unlock_kernel(); | ||
135 | return -EBUSY; | 138 | return -EBUSY; |
139 | } | ||
136 | ret = vmwdt_keepalive(); | 140 | ret = vmwdt_keepalive(); |
137 | if (ret) | 141 | if (ret) |
138 | clear_bit(0, &vmwdt_is_open); | 142 | clear_bit(0, &vmwdt_is_open); |
143 | unlock_kernel(); | ||
139 | return ret ? ret : nonseekable_open(i, f); | 144 | return ret ? ret : nonseekable_open(i, f); |
140 | } | 145 | } |
141 | 146 | ||