diff options
author | Jörn Engel <joern@logfs.org> | 2010-04-22 08:11:43 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2010-04-22 08:11:43 -0400 |
commit | 6de9400250f95f82da432c28b9b43823f4154c58 (patch) | |
tree | 6125f79cda585842162096ded41c8ce859593144 /drivers | |
parent | 424264b7b220e8eee165dc3080ae48692af73dec (diff) |
Fix JFFS2 sync silent failure
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 <joern@logfs.org>
Acked-By: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/mtdsuper.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mtd/mtdsuper.c b/drivers/mtd/mtdsuper.c index af8b42e0a55b..7c003191fca4 100644 --- a/drivers/mtd/mtdsuper.c +++ b/drivers/mtd/mtdsuper.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/mtd/super.h> | 13 | #include <linux/mtd/super.h> |
14 | #include <linux/namei.h> | 14 | #include <linux/namei.h> |
15 | #include <linux/ctype.h> | 15 | #include <linux/ctype.h> |
16 | #include <linux/slab.h> | ||
16 | 17 | ||
17 | /* | 18 | /* |
18 | * compare superblocks to see if they're equivalent | 19 | * compare superblocks to see if they're equivalent |
@@ -44,6 +45,7 @@ static int get_sb_mtd_set(struct super_block *sb, void *_mtd) | |||
44 | 45 | ||
45 | sb->s_mtd = mtd; | 46 | sb->s_mtd = mtd; |
46 | sb->s_dev = MKDEV(MTD_BLOCK_MAJOR, mtd->index); | 47 | sb->s_dev = MKDEV(MTD_BLOCK_MAJOR, mtd->index); |
48 | sb->s_bdi = mtd->backing_dev_info; | ||
47 | return 0; | 49 | return 0; |
48 | } | 50 | } |
49 | 51 | ||