| Date | Sat, 10 Oct 2009 15:35:43 -0000 | From | Thomas Gleixner <> | Subject | [patch 05/28] drivers: Remove BKL from drivers/char/misc.c |
| |
misc_open() is already serialized with misc_mtx. Remove the BKL locking which got there via the BKL pushdown.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/char/misc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
Index: linux-2.6-tip/drivers/char/misc.c =================================================================== --- linux-2.6-tip.orig/drivers/char/misc.c +++ linux-2.6-tip/drivers/char/misc.c @@ -49,7 +49,6 @@ #include <linux/device.h> #include <linux/tty.h> #include <linux/kmod.h> -#include <linux/smp_lock.h> /* * Head entry for the doubly linked miscdevice list @@ -118,8 +117,7 @@ static int misc_open(struct inode * inod struct miscdevice *c; int err = -ENODEV; const struct file_operations *old_fops, *new_fops = NULL; - - lock_kernel(); + mutex_lock(&misc_mtx); list_for_each_entry(c, &misc_list, list) { @@ -157,7 +155,6 @@ static int misc_open(struct inode * inod fops_put(old_fops); fail: mutex_unlock(&misc_mtx); - unlock_kernel(); return err; }
|