Skip to content

Commit

Permalink
drivers: Remove BKL from misc_open
Browse files Browse the repository at this point in the history
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>
LKML-Reference: <20091010153349.237173041@linutronix.de>
  • Loading branch information
Thomas Gleixner committed Oct 14, 2009
1 parent 80f5069 commit 40b798e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/char/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -118,8 +117,7 @@ static int misc_open(struct inode * inode, struct file * file)
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) {
Expand Down Expand Up @@ -157,7 +155,6 @@ static int misc_open(struct inode * inode, struct file * file)
fops_put(old_fops);
fail:
mutex_unlock(&misc_mtx);
unlock_kernel();
return err;
}

Expand Down

0 comments on commit 40b798e

Please sign in to comment.