jffs2: remove unnecessary GC pass on sync
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Mon, 7 May 2012 16:56:52 +0000 (19:56 +0300)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 31 May 2012 01:04:51 +0000 (21:04 -0400)
We do not need to call 'jffs2_write_super()' on sync. This function
causes a GC pass to make sure the current contents is pushed out with
the data which we already have on the media.

But this is not needed on unmount and only slows sync down unnecessarily.
It is enough to just sync the write-buffer.

This call was added by one of the generic VFS rework patch-sets,
see d579ed00aa96a7f7486978540a0d7cecaff742ae.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/jffs2/super.c

index d3dc9d8d3a10a686a8e6c8801944aca2d0066a2d..dc366c0c9304e06b62880b39f8179faa6b6e6809 100644 (file)
@@ -110,8 +110,6 @@ static int jffs2_sync_fs(struct super_block *sb, int wait)
 {
        struct jffs2_sb_info *c = JFFS2_SB_INFO(sb);
 
-       jffs2_write_super(sb);
-
        mutex_lock(&c->alloc_sem);
        jffs2_flush_wbuf_pad(c);
        mutex_unlock(&c->alloc_sem);