diff mbox

[06/12] BKL: Remove BKL from capifs

Message ID 1284659185-8942-7-git-send-email-arnd@arndb.de
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

Arnd Bergmann Sept. 16, 2010, 5:46 p.m. UTC
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: netdev@vger.kernel.org
---
 drivers/isdn/capi/capifs.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

Comments

David Miller Sept. 17, 2010, 11:35 p.m. UTC | #1
From: Arnd Bergmann <arnd@arndb.de>
Date: Thu, 16 Sep 2010 19:46:19 +0200

> 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: netdev@vger.kernel.org

I've searched Linus's tree, net-2.6, and net-next-2.6 and I cannot
find one reference to lock_kernel() in drivers/isdn/capi/capifs.c
in any of them.

What did you write this patch against?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Arnd Bergmann Sept. 18, 2010, 7:55 a.m. UTC | #2
On Saturday 18 September 2010 01:35:30 David Miller wrote:
> 
> From: Arnd Bergmann <arnd@arndb.de>
> Date: Thu, 16 Sep 2010 19:46:19 +0200
> 
> > 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: netdev@vger.kernel.org
> 
> I've searched Linus's tree, net-2.6, and net-next-2.6 and I cannot
> find one reference to lock_kernel() in drivers/isdn/capi/capifs.c
> in any of them.
> 
> What did you write this patch against?

As I wrote in my [PATCH 0/12], it applies on top of the pushdown
of the BKL into the get_sb operation, and I intend to submit it
to Linus with the full series.

I agree that this particular patch is a bit pointless because
all it does is to undo the change from the pushdown. I guess
that at the time when the first patch was written, the BKL
was still present in other parts of capifs.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/isdn/capi/capifs.c b/drivers/isdn/capi/capifs.c
index c559b52..b0dcdbc 100644
--- a/drivers/isdn/capi/capifs.c
+++ b/drivers/isdn/capi/capifs.c
@@ -17,7 +17,6 @@ 
 #include <linux/init.h>
 #include <linux/ctype.h>
 #include <linux/sched.h>	/* current */
-#include <linux/smp_lock.h>	/* For lock_kernel() */
 
 #include "capifs.h"
 
@@ -100,8 +99,6 @@  capifs_fill_super(struct super_block *s, void *data, int silent)
 {
 	struct inode * inode;
 
-	lock_kernel();
-
 	s->s_blocksize = 1024;
 	s->s_blocksize_bits = 10;
 	s->s_magic = CAPIFS_SUPER_MAGIC;
@@ -119,15 +116,12 @@  capifs_fill_super(struct super_block *s, void *data, int silent)
 	inode->i_nlink = 2;
 
 	s->s_root = d_alloc_root(inode);
-	if (s->s_root) {
-		unlock_kernel();
+	if (s->s_root)
 		return 0;
-	}
 
 	printk("capifs: get root dentry failed\n");
 	iput(inode);
 fail:
-	unlock_kernel();
 	return -ENOMEM;
 }