Merge branch 'bkl-removal' of git://git.lwn.net/linux-2.6
* 'bkl-removal' of git://git.lwn.net/linux-2.6: (146 commits) IB/umad: BKL is not needed for ib_umad_open() IB/uverbs: BKL is not needed for ib_uverbs_open() bf561-coreb: BKL unneeded for open() Call fasync() functions without the BKL snd/PCM: fasync BKL pushdown ipmi: fasync BKL pushdown ecryptfs: fasync BKL pushdown Bluetooth VHCI: fasync BKL pushdown tty_io: fasync BKL pushdown tun: fasync BKL pushdown i2o: fasync BKL pushdown mpt: fasync BKL pushdown Remove BKL from remote_llseek v2 Make FAT users happier by not deadlocking x86-mce: BKL pushdown vmwatchdog: BKL pushdown vmcp: BKL pushdown via-pmu: BKL pushdown uml-random: BKL pushdown uml-mmapper: BKL pushdown ...
This commit is contained in:
@@ -10,6 +10,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>
|
||||
@@ -291,6 +292,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;
|
||||
@@ -327,6 +329,7 @@ static int mon_open(struct inode *inode, struct file *filp)
|
||||
goto out_path;
|
||||
}
|
||||
filp->private_data = monpriv;
|
||||
unlock_kernel();
|
||||
return nonseekable_open(inode, filp);
|
||||
|
||||
out_path:
|
||||
@@ -336,6 +339,7 @@ out_priv:
|
||||
out_use:
|
||||
clear_bit(MON_IN_USE, &mon_in_use);
|
||||
out:
|
||||
unlock_kernel();
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user