]> git.karo-electronics.de Git - karo-tx-linux.git/commit
JFFS2: fix unmount regression
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Thu, 23 Aug 2012 07:10:07 +0000 (10:10 +0300)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Thu, 23 Aug 2012 12:30:44 +0000 (15:30 +0300)
commit7dacbf443ebf9a176ff264075b1d50e925cec225
tree6680604c8e2d733a14d6380f2915a91df26e0a46
parent6e5995e7ccb8abd2f1c2b0c93f5bb9fd8feb3cda
JFFS2: fix unmount regression

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 <ludovic.desroches@atmel.com>
Cc: stable@vger.kernel.org [3.5+]
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Tested-by: Ludovic Desroches <ludovic.desroches@atmel.com>
fs/jffs2/super.c