aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/jffs2/fs.c4
-rw-r--r--fs/jffs2/super.c12
2 files changed, 1 insertions, 15 deletions
diff --git a/fs/jffs2/fs.c b/fs/jffs2/fs.c
index 6b2964a19850..d9beb06e6fca 100644
--- a/fs/jffs2/fs.c
+++ b/fs/jffs2/fs.c
@@ -21,7 +21,6 @@
21#include <linux/vmalloc.h> 21#include <linux/vmalloc.h>
22#include <linux/vfs.h> 22#include <linux/vfs.h>
23#include <linux/crc32.h> 23#include <linux/crc32.h>
24#include <linux/smp_lock.h>
25#include "nodelist.h" 24#include "nodelist.h"
26 25
27static int jffs2_flash_setup(struct jffs2_sb_info *c); 26static int jffs2_flash_setup(struct jffs2_sb_info *c);
@@ -391,7 +390,6 @@ int jffs2_remount_fs (struct super_block *sb, int *flags, char *data)
391 This also catches the case where it was stopped and this 390 This also catches the case where it was stopped and this
392 is just a remount to restart it. 391 is just a remount to restart it.
393 Flush the writebuffer, if neccecary, else we loose it */ 392 Flush the writebuffer, if neccecary, else we loose it */
394 lock_kernel();
395 if (!(sb->s_flags & MS_RDONLY)) { 393 if (!(sb->s_flags & MS_RDONLY)) {
396 jffs2_stop_garbage_collect_thread(c); 394 jffs2_stop_garbage_collect_thread(c);
397 mutex_lock(&c->alloc_sem); 395 mutex_lock(&c->alloc_sem);
@@ -403,8 +401,6 @@ int jffs2_remount_fs (struct super_block *sb, int *flags, char *data)
403 jffs2_start_garbage_collect_thread(c); 401 jffs2_start_garbage_collect_thread(c);
404 402
405 *flags |= MS_NOATIME; 403 *flags |= MS_NOATIME;
406
407 unlock_kernel();
408 return 0; 404 return 0;
409} 405}
410 406
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