summaryrefslogtreecommitdiff
path: root/fs/jffs2/super.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2010-09-16 18:11:09 +0400
committerArnd Bergmann <arnd@arndb.de>2010-10-04 23:10:50 +0400
commit1a028dd2dd589c3924d9711a1b073a13c820b6b5 (patch)
treee93d344ef2f9f0e318a94e530cdfa1dc208feda5 /fs/jffs2/super.c
parent18dfe89d7c394b56e20e06dde8b7a80ff96cf02c (diff)
downloadlinux-1a028dd2dd589c3924d9711a1b073a13c820b6b5.tar.xz
BKL: Remove BKL from jffs2
The BKL is only used in put_super, fill_super and remount_fs that are all three 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 Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'fs/jffs2/super.c')
-rw-r--r--fs/jffs2/super.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c
index 58dd9cf06206..d1ae5dfc22b9 100644
--- a/fs/jffs2/super.c
+++ b/fs/jffs2/super.c
@@ -12,7 +12,6 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
-#include <linux/smp_lock.h>
#include <linux/init.h>
#include <linux/list.h>
#include <linux/fs.h>
@@ -148,17 +147,13 @@ static int jffs2_fill_super(struct super_block *sb, void *data, int silent)
struct jffs2_sb_info *c;
int ret;
- lock_kernel();
-
D1(printk(KERN_DEBUG "jffs2_get_sb_mtd():"
" New superblock for device %d (\"%s\")\n",
sb->s_mtd->index, sb->s_mtd->name));
c = kzalloc(sizeof(*c), GFP_KERNEL);
- if (!c) {
- unlock_kernel();
+ if (!c)
return -ENOMEM;
- }
c->mtd = sb->s_mtd;
c->os_priv = sb;
@@ -181,7 +176,6 @@ static int jffs2_fill_super(struct super_block *sb, void *data, int silent)
sb->s_flags |= MS_POSIXACL;
#endif
ret = jffs2_do_fill_super(sb, data, silent);
- unlock_kernel();
return ret;
}
@@ -199,8 +193,6 @@ static void jffs2_put_super (struct super_block *sb)
D2(printk(KERN_DEBUG "jffs2: jffs2_put_super()\n"));
- lock_kernel();
-
if (sb->s_dirt)
jffs2_write_super(sb);
@@ -222,8 +214,6 @@ static void jffs2_put_super (struct super_block *sb)
if (c->mtd->sync)
c->mtd->sync(c->mtd);
- unlock_kernel();
-
D1(printk(KERN_DEBUG "jffs2_put_super returning\n"));
}