aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2008-05-20 13:16:17 -0400
committerJonathan Corbet <corbet@lwn.net>2008-07-02 17:06:04 -0400
commit6ce46a435a3ac9e706d09a3075cbc60ed72d37db (patch)
tree91cc328ba211ec377c29a460bd9dc10c2374fcdc /drivers/s390
parent77149367dade50af8370420265bd4f818cde8afd (diff)
monreader: BKL pushdown
[jmc: added <linux/smp_lock.h>] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/char/monreader.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/s390/char/monreader.c b/drivers/s390/char/monreader.c
index 1e1f50655bbf..dc4710e64e0c 100644
--- a/drivers/s390/char/monreader.c
+++ b/drivers/s390/char/monreader.c
@@ -11,6 +11,7 @@
11#include <linux/module.h> 11#include <linux/module.h>
12#include <linux/moduleparam.h> 12#include <linux/moduleparam.h>
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/smp_lock.h>
14#include <linux/errno.h> 15#include <linux/errno.h>
15#include <linux/types.h> 16#include <linux/types.h>
16#include <linux/kernel.h> 17#include <linux/kernel.h>
@@ -340,6 +341,7 @@ static int mon_open(struct inode *inode, struct file *filp)
340 /* 341 /*
341 * only one user allowed 342 * only one user allowed
342 */ 343 */
344 lock_kernel();
343 rc = -EBUSY; 345 rc = -EBUSY;
344 if (test_and_set_bit(MON_IN_USE, &mon_in_use)) 346 if (test_and_set_bit(MON_IN_USE, &mon_in_use))
345 goto out; 347 goto out;
@@ -377,6 +379,7 @@ static int mon_open(struct inode *inode, struct file *filp)
377 } 379 }
378 P_INFO("open, established connection to *MONITOR service\n\n"); 380 P_INFO("open, established connection to *MONITOR service\n\n");
379 filp->private_data = monpriv; 381 filp->private_data = monpriv;
382 unlock_kernel();
380 return nonseekable_open(inode, filp); 383 return nonseekable_open(inode, filp);
381 384
382out_path: 385out_path:
@@ -386,6 +389,7 @@ out_priv:
386out_use: 389out_use:
387 clear_bit(MON_IN_USE, &mon_in_use); 390 clear_bit(MON_IN_USE, &mon_in_use);
388out: 391out:
392 unlock_kernel();
389 return rc; 393 return rc;
390} 394}
391 395