Skip to content

Commit

Permalink
[LogFS] Set s_bdi
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joern Engel committed Apr 17, 2010
1 parent 1f1b000 commit b863907
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fs/logfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*/
#include "logfs.h"
#include <linux/bio.h>
#include <linux/blkdev.h>
#include <linux/mtd/mtd.h>
#include <linux/statfs.h>
#include <linux/buffer_head.h>
Expand Down Expand Up @@ -136,6 +137,10 @@ static int logfs_sb_set(struct super_block *sb, void *_super)
sb->s_fs_info = super;
sb->s_mtd = super->s_mtd;
sb->s_bdev = super->s_bdev;
if (sb->s_bdev)
sb->s_bdi = &bdev_get_queue(sb->s_bdev)->backing_dev_info;
if (sb->s_mtd)
sb->s_bdi = sb->s_mtd->backing_dev_info;
return 0;
}

Expand Down

0 comments on commit b863907

Please sign in to comment.