Skip to content

Commit

Permalink
monreader: BKL pushdown
Browse files Browse the repository at this point in the history
[jmc: added <linux/smp_lock.h>]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
  • Loading branch information
Arnd Bergmann authored and Jonathan Corbet committed Jul 2, 2008
1 parent 7714936 commit 6ce46a4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/s390/char/monreader.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/smp_lock.h>
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/kernel.h>
Expand Down Expand Up @@ -340,6 +341,7 @@ static int mon_open(struct inode *inode, struct file *filp)
/*
* only one user allowed
*/
lock_kernel();
rc = -EBUSY;
if (test_and_set_bit(MON_IN_USE, &mon_in_use))
goto out;
Expand Down Expand Up @@ -377,6 +379,7 @@ static int mon_open(struct inode *inode, struct file *filp)
}
P_INFO("open, established connection to *MONITOR service\n\n");
filp->private_data = monpriv;
unlock_kernel();
return nonseekable_open(inode, filp);

out_path:
Expand All @@ -386,6 +389,7 @@ static int mon_open(struct inode *inode, struct file *filp)
out_use:
clear_bit(MON_IN_USE, &mon_in_use);
out:
unlock_kernel();
return rc;
}

Expand Down

0 comments on commit 6ce46a4

Please sign in to comment.