Skip to content

Commit 01ba687

Browse files
Christoph HellwigAl Viro
authored andcommitted
jffs2: move jffs2_write_super to super.c
jffs2_write_super is only called from super.c and doesn't use any functionality from fs.c. So move it over to super.c and make it static there. [should go in through the vfs tree as it is a requirement for the next patch] Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 4aa98cf commit 01ba687

3 files changed

Lines changed: 14 additions & 16 deletions

File tree

‎fs/jffs2/fs.c‎

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -402,21 +402,6 @@ int jffs2_remount_fs (struct super_block *sb, int *flags, char *data)
402402
return 0;
403403
}
404404

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-
420405
/* jffs2_new_inode: allocate a new inode and inocache, add it to the hash,
421406
fill in the raw_inode while you're at it. */
422407
struct inode *jffs2_new_inode (struct inode *dir_i, int mode, struct jffs2_raw_inode *ri)

‎fs/jffs2/os-linux.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ void jffs2_dirty_inode(struct inode *inode);
181181
struct inode *jffs2_new_inode (struct inode *dir_i, int mode,
182182
struct jffs2_raw_inode *ri);
183183
int jffs2_statfs (struct dentry *, struct kstatfs *);
184-
void jffs2_write_super (struct super_block *);
185184
int jffs2_remount_fs (struct super_block *, int *, char *);
186185
int jffs2_do_fill_super(struct super_block *sb, void *data, int silent);
187186
void jffs2_gc_release_inode(struct jffs2_sb_info *c,

‎fs/jffs2/super.c‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,20 @@ static void jffs2_i_init_once(void *foo)
5353
inode_init_once(&f->vfs_inode);
5454
}
5555

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+
5670
static int jffs2_sync_fs(struct super_block *sb, int wait)
5771
{
5872
struct jffs2_sb_info *c = JFFS2_SB_INFO(sb);

0 commit comments

Comments
 (0)