diff options
author | Arnd Bergmann <arnd@arndb.de> | 2008-05-20 19:17:01 +0200 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2008-07-02 23:06:26 +0200 |
commit | 3e0420f066c632e135939ccf218ae793e02dccd7 (patch) | |
tree | 64a0803cda185a704a8d44e831d195c0667708cc /drivers/s390/char/vmwatchdog.c | |
parent | vmcp: BKL pushdown (diff) | |
download | linux-3e0420f066c632e135939ccf218ae793e02dccd7.tar.xz linux-3e0420f066c632e135939ccf218ae793e02dccd7.zip |
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 @@ #include <linux/module.h> #include <linux/moduleparam.h> #include <linux/watchdog.h> +#include <linux/smp_lock.h> #include <asm/ebcdic.h> #include <asm/io.h> @@ -131,11 +132,15 @@ static int __init vmwdt_probe(void) static int vmwdt_open(struct inode *i, struct file *f) { int ret; - if (test_and_set_bit(0, &vmwdt_is_open)) + lock_kernel(); + if (test_and_set_bit(0, &vmwdt_is_open)) { + unlock_kernel(); return -EBUSY; + } ret = vmwdt_keepalive(); if (ret) clear_bit(0, &vmwdt_is_open); + unlock_kernel(); return ret ? ret : nonseekable_open(i, f); } |