lkml.org 
[lkml]   [2010]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 07/12] BKL: Remove BKL from USB gadgetfs
Date
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@arndb.de>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: linux-usb@vger.kernel.org
---
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


\
 
 \ /
  Last update: 2010-09-16 19:53    [W:0.106 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site