From: Arnd Bergmann Date: Tue, 20 May 2008 17:17:01 +0000 (+0200) Subject: vmwatchdog: BKL pushdown X-Git-Tag: v2.6.27-rc1~1103^2~16 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e0420f066c632e135939ccf218ae793e02dccd7;p=linux-2.6 vmwatchdog: BKL pushdown Signed-off-by: Arnd Bergmann --- diff --git a/drivers/s390/char/vmwatchdog.c b/drivers/s390/char/vmwatchdog.c index 19f8389291..ee80e936d5 100644 --- a/drivers/s390/char/vmwatchdog.c +++ b/drivers/s390/char/vmwatchdog.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -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); }