diff options
author | Arnd Bergmann <arnd@arndb.de> | 2010-09-16 10:11:09 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2010-10-04 15:10:50 -0400 |
commit | 1a028dd2dd589c3924d9711a1b073a13c820b6b5 (patch) | |
tree | e93d344ef2f9f0e318a94e530cdfa1dc208feda5 /fs/jffs2/super.c | |
parent | 18dfe89d7c394b56e20e06dde8b7a80ff96cf02c (diff) |
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.c | 12 |
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 @@ | |||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
15 | #include <linux/smp_lock.h> | ||
16 | #include <linux/init.h> | 15 | #include <linux/init.h> |
17 | #include <linux/list.h> | 16 | #include <linux/list.h> |
18 | #include <linux/fs.h> | 17 | #include <linux/fs.h> |
@@ -148,17 +147,13 @@ static int jffs2_fill_super(struct super_block *sb, void *data, int silent) | |||
148 | struct jffs2_sb_info *c; | 147 | struct jffs2_sb_info *c; |
149 | int ret; | 148 | int ret; |
150 | 149 | ||
151 | lock_kernel(); | ||
152 | |||
153 | D1(printk(KERN_DEBUG "jffs2_get_sb_mtd():" | 150 | D1(printk(KERN_DEBUG "jffs2_get_sb_mtd():" |
154 | " New superblock for device %d (\"%s\")\n", | 151 | " New superblock for device %d (\"%s\")\n", |
155 | sb->s_mtd->index, sb->s_mtd->name)); | 152 | sb->s_mtd->index, sb->s_mtd->name)); |
156 | 153 | ||
157 | c = kzalloc(sizeof(*c), GFP_KERNEL); | 154 | c = kzalloc(sizeof(*c), GFP_KERNEL); |
158 | if (!c) { | 155 | if (!c) |
159 | unlock_kernel(); | ||
160 | return -ENOMEM; | 156 | return -ENOMEM; |
161 | } | ||
162 | 157 | ||
163 | c->mtd = sb->s_mtd; | 158 | c->mtd = sb->s_mtd; |
164 | c->os_priv = sb; | 159 | c->os_priv = sb; |
@@ -181,7 +176,6 @@ static int jffs2_fill_super(struct super_block *sb, void *data, int silent) | |||
181 | sb->s_flags |= MS_POSIXACL; | 176 | sb->s_flags |= MS_POSIXACL; |
182 | #endif | 177 | #endif |
183 | ret = jffs2_do_fill_super(sb, data, silent); | 178 | ret = jffs2_do_fill_super(sb, data, silent); |
184 | unlock_kernel(); | ||
185 | return ret; | 179 | return ret; |
186 | } | 180 | } |
187 | 181 | ||
@@ -199,8 +193,6 @@ static void jffs2_put_super (struct super_block *sb) | |||
199 | 193 | ||
200 | D2(printk(KERN_DEBUG "jffs2: jffs2_put_super()\n")); | 194 | D2(printk(KERN_DEBUG "jffs2: jffs2_put_super()\n")); |
201 | 195 | ||
202 | lock_kernel(); | ||
203 | |||
204 | if (sb->s_dirt) | 196 | if (sb->s_dirt) |
205 | jffs2_write_super(sb); | 197 | jffs2_write_super(sb); |
206 | 198 | ||
@@ -222,8 +214,6 @@ static void jffs2_put_super (struct super_block *sb) | |||
222 | if (c->mtd->sync) | 214 | if (c->mtd->sync) |
223 | c->mtd->sync(c->mtd); | 215 | c->mtd->sync(c->mtd); |
224 | 216 | ||
225 | unlock_kernel(); | ||
226 | |||
227 | D1(printk(KERN_DEBUG "jffs2_put_super returning\n")); | 217 | D1(printk(KERN_DEBUG "jffs2_put_super returning\n")); |
228 | } | 218 | } |
229 | 219 | ||