diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/jffs2/fs.c | 15 | ||||
-rw-r--r-- | fs/jffs2/os-linux.h | 1 | ||||
-rw-r--r-- | fs/jffs2/super.c | 14 |
3 files changed, 14 insertions, 16 deletions
diff --git a/fs/jffs2/fs.c b/fs/jffs2/fs.c index 249305d65d5b..237b27a3d570 100644 --- a/fs/jffs2/fs.c +++ b/fs/jffs2/fs.c | |||
@@ -402,21 +402,6 @@ int jffs2_remount_fs (struct super_block *sb, int *flags, char *data) | |||
402 | return 0; | 402 | return 0; |
403 | } | 403 | } |
404 | 404 | ||
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, | 405 | /* 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. */ | 406 | 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) | 407 | struct inode *jffs2_new_inode (struct inode *dir_i, int mode, struct jffs2_raw_inode *ri) |
diff --git a/fs/jffs2/os-linux.h b/fs/jffs2/os-linux.h index 5e194a5c8e29..2228380c47b9 100644 --- a/fs/jffs2/os-linux.h +++ b/fs/jffs2/os-linux.h | |||
@@ -181,7 +181,6 @@ void jffs2_dirty_inode(struct inode *inode); | |||
181 | struct inode *jffs2_new_inode (struct inode *dir_i, int mode, | 181 | struct inode *jffs2_new_inode (struct inode *dir_i, int mode, |
182 | struct jffs2_raw_inode *ri); | 182 | struct jffs2_raw_inode *ri); |
183 | int jffs2_statfs (struct dentry *, struct kstatfs *); | 183 | int jffs2_statfs (struct dentry *, struct kstatfs *); |
184 | void jffs2_write_super (struct super_block *); | ||
185 | int jffs2_remount_fs (struct super_block *, int *, char *); | 184 | int jffs2_remount_fs (struct super_block *, int *, char *); |
186 | int jffs2_do_fill_super(struct super_block *sb, void *data, int silent); | 185 | int jffs2_do_fill_super(struct super_block *sb, void *data, int silent); |
187 | void jffs2_gc_release_inode(struct jffs2_sb_info *c, | 186 | void jffs2_gc_release_inode(struct jffs2_sb_info *c, |
diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c index 37b12125c127..a80a50e445e2 100644 --- a/fs/jffs2/super.c +++ b/fs/jffs2/super.c | |||
@@ -53,6 +53,20 @@ static void jffs2_i_init_once(void *foo) | |||
53 | inode_init_once(&f->vfs_inode); | 53 | inode_init_once(&f->vfs_inode); |
54 | } | 54 | } |
55 | 55 | ||
56 | static void jffs2_write_super(struct super_block *sb) | ||
57 | { | ||
58 | struct jffs2_sb_info *c = JFFS2_SB_INFO(sb); | ||
59 | sb->s_dirt = 0; | ||
60 | |||
61 | if (sb->s_flags & MS_RDONLY) | ||
62 | return; | ||
63 | |||
64 | D1(printk(KERN_DEBUG "jffs2_write_super()\n")); | ||
65 | jffs2_garbage_collect_trigger(c); | ||
66 | jffs2_erase_pending_blocks(c, 0); | ||
67 | jffs2_flush_wbuf_gc(c, 0); | ||
68 | } | ||
69 | |||
56 | static int jffs2_sync_fs(struct super_block *sb, int wait) | 70 | static int jffs2_sync_fs(struct super_block *sb, int wait) |
57 | { | 71 | { |
58 | struct jffs2_sb_info *c = JFFS2_SB_INFO(sb); | 72 | struct jffs2_sb_info *c = JFFS2_SB_INFO(sb); |