From 6de9400250f95f82da432c28b9b43823f4154c58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Engel?= Date: Thu, 22 Apr 2010 14:11:43 +0200 Subject: Fix JFFS2 sync silent failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit JFFS2 does not appear to set s_bdi anywhere. And as of 32a88aa1, __sync_filesystem() will return 0 if s_bdi is not set. As a result, sync_fs() is never called for jffs2 and whatever remains in the wbuf will not make it to the device. Fix that up by assigning the mtd bdi. Signed-off-by: Jörn Engel Acked-By: David Woodhouse Signed-off-by: Jens Axboe --- drivers/mtd/mtdsuper.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/mtd/mtdsuper.c') diff --git a/drivers/mtd/mtdsuper.c b/drivers/mtd/mtdsuper.c index af8b42e0a55..7c003191fca 100644 --- a/drivers/mtd/mtdsuper.c +++ b/drivers/mtd/mtdsuper.c @@ -13,6 +13,7 @@ #include #include #include +#include /* * compare superblocks to see if they're equivalent @@ -44,6 +45,7 @@ static int get_sb_mtd_set(struct super_block *sb, void *_mtd) sb->s_mtd = mtd; sb->s_dev = MKDEV(MTD_BLOCK_MAJOR, mtd->index); + sb->s_bdi = mtd->backing_dev_info; return 0; } -- cgit v1.2.3