This is a note to let you know that I've just added the patch titled

    JFFS2: fix unmount regression

to the 3.6-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     jffs2-fix-unmount-regression.patch
and it can be found in the queue-3.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From a445f784ae5558a3da680aa6b39ed53c95a551c1 Mon Sep 17 00:00:00 2001
From: Artem Bityutskiy <[email protected]>
Date: Thu, 23 Aug 2012 10:10:07 +0300
Subject: JFFS2: fix unmount regression

From: Artem Bityutskiy <[email protected]>

commit a445f784ae5558a3da680aa6b39ed53c95a551c1 upstream.

This patch fixes regression introduced by
"8bdc81c jffs2: get rid of jffs2_sync_super". We submit a delayed work in order
to make sure the write-buffer is synchronized at some point. But we do not
flush it when we unmount, which causes an oops when we unmount the file-system
and then the delayed work is executed.

This patch fixes the issue by adding a "cancel_delayed_work_sync()" infocation
in the '->sync_fs()' handler. This will make sure the delayed work is canceled
on sync, unmount and re-mount. And because VFS always callse 'sync_fs()' before
unmounting or remounting, this fixes the issue.

Reported-by: Ludovic Desroches <[email protected]>
Signed-off-by: Artem Bityutskiy <[email protected]>
Tested-by: Ludovic Desroches <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 fs/jffs2/super.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/fs/jffs2/super.c
+++ b/fs/jffs2/super.c
@@ -100,6 +100,10 @@ static int jffs2_sync_fs(struct super_bl
 {
        struct jffs2_sb_info *c = JFFS2_SB_INFO(sb);
 
+#ifdef CONFIG_JFFS2_FS_WRITEBUFFER
+       cancel_delayed_work_sync(&c->wbuf_dwork);
+#endif
+
        mutex_lock(&c->alloc_sem);
        jffs2_flush_wbuf_pad(c);
        mutex_unlock(&c->alloc_sem);


Patches currently in stable-queue which might be from 
[email protected] are

queue-3.6/mtd-nand-use-the-mirror-bbt-descriptor-when-reading-its-version.patch
queue-3.6/mtd-autcpu12-nvram-fix-compile-breakage.patch
queue-3.6/jffs2-don-t-fail-on-bitflips-in-oob.patch
queue-3.6/jffs2-fix-unmount-regression.patch
queue-3.6/mtd-omap2-fix-module-loading.patch
queue-3.6/mtd-mtdpart-break-it-as-soon-as-we-parse-out-the-partitions.patch
queue-3.6/mtd-nandsim-bugfix-fail-if-overridesize-is-too-big.patch
queue-3.6/mtd-omap2-fix-omap_nand_remove-segfault.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to