mirror of
https://github.com/torvalds/linux.git
synced 2024-11-02 02:01:29 +00:00
serio: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
parent
556e4b0b69
commit
9edca64b72
@ -10,6 +10,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
|
#include <linux/smp_lock.h>
|
||||||
#include <linux/poll.h>
|
#include <linux/poll.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/serio.h>
|
#include <linux/serio.h>
|
||||||
@ -81,9 +82,10 @@ static int serio_raw_open(struct inode *inode, struct file *file)
|
|||||||
struct serio_raw_list *list;
|
struct serio_raw_list *list;
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
|
|
||||||
|
lock_kernel();
|
||||||
retval = mutex_lock_interruptible(&serio_raw_mutex);
|
retval = mutex_lock_interruptible(&serio_raw_mutex);
|
||||||
if (retval)
|
if (retval)
|
||||||
return retval;
|
goto out_bkl;
|
||||||
|
|
||||||
if (!(serio_raw = serio_raw_locate(iminor(inode)))) {
|
if (!(serio_raw = serio_raw_locate(iminor(inode)))) {
|
||||||
retval = -ENODEV;
|
retval = -ENODEV;
|
||||||
@ -108,6 +110,8 @@ static int serio_raw_open(struct inode *inode, struct file *file)
|
|||||||
|
|
||||||
out:
|
out:
|
||||||
mutex_unlock(&serio_raw_mutex);
|
mutex_unlock(&serio_raw_mutex);
|
||||||
|
out_bkl:
|
||||||
|
unlock_kernel();
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user