summaryrefslogtreecommitdiff
path: root/fs/logfs
diff options
context:
space:
mode:
authorJoern Engel <joern@logfs.org>2010-04-17 19:54:27 +0200
committerJoern Engel <joern@logfs.org>2010-04-17 19:54:27 +0200
commitb8639077abf034824046ed09e779b74c4393031f (patch)
tree4b880158818468024f6e8e09cba5b3a76ca994b9 /fs/logfs
parent1f1b0008e8dd1930d6e89522c70f4a438374302a (diff)
downloadlinux-exynos-b8639077abf034824046ed09e779b74c4393031f.tar.gz
linux-exynos-b8639077abf034824046ed09e779b74c4393031f.tar.bz2
linux-exynos-b8639077abf034824046ed09e779b74c4393031f.zip
[LogFS] Set s_bdi
Since 32a88aa1 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>
Diffstat (limited to 'fs/logfs')
-rw-r--r--fs/logfs/super.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/logfs/super.c b/fs/logfs/super.c
index d4531eb46d0a..dacce3a917ae 100644
--- a/fs/logfs/super.c
+++ b/fs/logfs/super.c
@@ -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>
@@ -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;
}