Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Snippets Groups Projects
Commit 6de94002 authored by Jörn Engel's avatar Jörn Engel Committed by Jens Axboe
Browse files

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: default avatarJörn Engel <joern@logfs.org>
Acked-By: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
parent 424264b7
No related branches found
No related tags found
No related merge requests found
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <linux/mtd/super.h> #include <linux/mtd/super.h>
#include <linux/namei.h> #include <linux/namei.h>
#include <linux/ctype.h> #include <linux/ctype.h>
#include <linux/slab.h>
/* /*
* compare superblocks to see if they're equivalent * 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,6 +45,7 @@ static int get_sb_mtd_set(struct super_block *sb, void *_mtd)
sb->s_mtd = mtd; sb->s_mtd = mtd;
sb->s_dev = MKDEV(MTD_BLOCK_MAJOR, mtd->index); sb->s_dev = MKDEV(MTD_BLOCK_MAJOR, mtd->index);
sb->s_bdi = mtd->backing_dev_info;
return 0; return 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment