Skip to content

Commit b863907

Browse files
author
Joern Engel
committed
[LogFS] Set s_bdi
Since 32a88aa sync() was turned into a NOP for logfs. Worse, sync() would not return an error, giving the illusion that writeout had actually happened. Afaics jffs2 was broken as well. Signed-off-by: Joern Engel <joern@logfs.org>
1 parent 1f1b000 commit b863907

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎fs/logfs/super.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
*/
1212
#include "logfs.h"
1313
#include <linux/bio.h>
14+
#include <linux/blkdev.h>
1415
#include <linux/mtd/mtd.h>
1516
#include <linux/statfs.h>
1617
#include <linux/buffer_head.h>
@@ -136,6 +137,10 @@ static int logfs_sb_set(struct super_block *sb, void *_super)
136137
sb->s_fs_info = super;
137138
sb->s_mtd = super->s_mtd;
138139
sb->s_bdev = super->s_bdev;
140+
if (sb->s_bdev)
141+
sb->s_bdi = &bdev_get_queue(sb->s_bdev)->backing_dev_info;
142+
if (sb->s_mtd)
143+
sb->s_bdi = sb->s_mtd->backing_dev_info;
139144
return 0;
140145
}
141146

0 commit comments

Comments
 (0)