diff options
Diffstat (limited to 'fs/jffs2/fs.c')
-rw-r--r-- | fs/jffs2/fs.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/fs/jffs2/fs.c b/fs/jffs2/fs.c index 249305d65d5b..3451a81b2142 100644 --- a/fs/jffs2/fs.c +++ b/fs/jffs2/fs.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/vmalloc.h> | 20 | #include <linux/vmalloc.h> |
21 | #include <linux/vfs.h> | 21 | #include <linux/vfs.h> |
22 | #include <linux/crc32.h> | 22 | #include <linux/crc32.h> |
23 | #include <linux/smp_lock.h> | ||
23 | #include "nodelist.h" | 24 | #include "nodelist.h" |
24 | 25 | ||
25 | static int jffs2_flash_setup(struct jffs2_sb_info *c); | 26 | static int jffs2_flash_setup(struct jffs2_sb_info *c); |
@@ -387,6 +388,7 @@ int jffs2_remount_fs (struct super_block *sb, int *flags, char *data) | |||
387 | This also catches the case where it was stopped and this | 388 | This also catches the case where it was stopped and this |
388 | is just a remount to restart it. | 389 | is just a remount to restart it. |
389 | Flush the writebuffer, if neccecary, else we loose it */ | 390 | Flush the writebuffer, if neccecary, else we loose it */ |
391 | lock_kernel(); | ||
390 | if (!(sb->s_flags & MS_RDONLY)) { | 392 | if (!(sb->s_flags & MS_RDONLY)) { |
391 | jffs2_stop_garbage_collect_thread(c); | 393 | jffs2_stop_garbage_collect_thread(c); |
392 | mutex_lock(&c->alloc_sem); | 394 | mutex_lock(&c->alloc_sem); |
@@ -399,24 +401,10 @@ int jffs2_remount_fs (struct super_block *sb, int *flags, char *data) | |||
399 | 401 | ||
400 | *flags |= MS_NOATIME; | 402 | *flags |= MS_NOATIME; |
401 | 403 | ||
404 | unlock_kernel(); | ||
402 | return 0; | 405 | return 0; |
403 | } | 406 | } |
404 | 407 | ||
405 | void jffs2_write_super (struct super_block *sb) | ||
406 | { | ||
407 | struct jffs2_sb_info *c = JFFS2_SB_INFO(sb); | ||
408 | sb->s_dirt = 0; | ||
409 | |||
410 | if (sb->s_flags & MS_RDONLY) | ||
411 | return; | ||
412 | |||
413 | D1(printk(KERN_DEBUG "jffs2_write_super()\n")); | ||
414 | jffs2_garbage_collect_trigger(c); | ||
415 | jffs2_erase_pending_blocks(c, 0); | ||
416 | jffs2_flush_wbuf_gc(c, 0); | ||
417 | } | ||
418 | |||
419 | |||
420 | /* jffs2_new_inode: allocate a new inode and inocache, add it to the hash, | 408 | /* jffs2_new_inode: allocate a new inode and inocache, add it to the hash, |
421 | fill in the raw_inode while you're at it. */ | 409 | fill in the raw_inode while you're at it. */ |
422 | struct inode *jffs2_new_inode (struct inode *dir_i, int mode, struct jffs2_raw_inode *ri) | 410 | struct inode *jffs2_new_inode (struct inode *dir_i, int mode, struct jffs2_raw_inode *ri) |