The BKL is only used in fill_super, which is protected by the superblocks s_umount rw_semaphore. Therefore it is safe to remove the BKL entirely. Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx> Cc: David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx> Cc: linux-usb@xxxxxxxxxxxxxxx --- drivers/usb/gadget/inode.c | 13 ++----------- 1 files changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c index 82a88d3..3f1d771 100644 --- a/drivers/usb/gadget/inode.c +++ b/drivers/usb/gadget/inode.c @@ -33,7 +33,6 @@ #include <linux/sched.h> #include <linux/slab.h> #include <linux/poll.h> -#include <linux/smp_lock.h> #include <linux/device.h> #include <linux/moduleparam.h> @@ -2043,19 +2042,13 @@ gadgetfs_fill_super (struct super_block *sb, void *opts, int silent) struct dentry *d; struct dev_data *dev; - lock_kernel(); - - if (the_device) { - unlock_kernel(); + if (the_device) return -ESRCH; - } /* fake probe to determine $CHIP */ (void) usb_gadget_register_driver (&probe_driver); - if (!CHIP) { - unlock_kernel(); + if (!CHIP) return -ENODEV; - } /* superblock */ sb->s_blocksize = PAGE_CACHE_SIZE; @@ -2092,7 +2085,6 @@ gadgetfs_fill_super (struct super_block *sb, void *opts, int silent) * from binding to a controller. */ the_device = dev; - unlock_kernel(); return 0; enomem3: @@ -2102,7 +2094,6 @@ enomem2: enomem1: iput (inode); enomem0: - unlock_kernel(); return -ENOMEM; } -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html