[PATCH 01/12] BKL: Remove BKL from usbfs

From: Arnd Bergmann
Date: Thu Sep 16 2010 - 13:49:31 EST


Nothing in there has a race that can be
prevented by holding the BKL.

Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxx>
Cc: Jan Blunck <jblunck@xxxxxxxxxxxxx>
---
drivers/usb/core/inode.c | 6 ------
1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/core/inode.c b/drivers/usb/core/inode.c
index 73ec8c2..9e2ec9f 100644
--- a/drivers/usb/core/inode.c
+++ b/drivers/usb/core/inode.c
@@ -39,7 +39,6 @@
#include <linux/parser.h>
#include <linux/notifier.h>
#include <linux/seq_file.h>
-#include <linux/smp_lock.h>
#include <linux/usb/hcd.h>
#include <asm/byteorder.h>
#include "usb.h"
@@ -457,8 +456,6 @@ static int usbfs_fill_super(struct super_block *sb, void *data, int silent)
struct inode *inode;
struct dentry *root;

- lock_kernel();
-
sb->s_blocksize = PAGE_CACHE_SIZE;
sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
sb->s_magic = USBDEVICE_SUPER_MAGIC;
@@ -468,7 +465,6 @@ static int usbfs_fill_super(struct super_block *sb, void *data, int silent)

if (!inode) {
dbg("%s: could not get inode!",__func__);
- unlock_kernel();
return -ENOMEM;
}

@@ -476,11 +472,9 @@ static int usbfs_fill_super(struct super_block *sb, void *data, int silent)
if (!root) {
dbg("%s: could not get root dentry!",__func__);
iput(inode);
- unlock_kernel();
return -ENOMEM;
}
sb->s_root = root;
- unlock_kernel();
return 0;
}

--
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/