diff options
author | Joern Engel <joern@logfs.org> | 2010-04-17 13:54:27 -0400 |
---|---|---|
committer | Joern Engel <joern@logfs.org> | 2010-04-17 13:54:27 -0400 |
commit | b8639077abf034824046ed09e779b74c4393031f (patch) | |
tree | 4b880158818468024f6e8e09cba5b3a76ca994b9 /fs/logfs | |
parent | 1f1b0008e8dd1930d6e89522c70f4a438374302a (diff) |
[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.c | 5 |
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 @@ | |||
11 | */ | 11 | */ |
12 | #include "logfs.h" | 12 | #include "logfs.h" |
13 | #include <linux/bio.h> | 13 | #include <linux/bio.h> |
14 | #include <linux/blkdev.h> | ||
14 | #include <linux/mtd/mtd.h> | 15 | #include <linux/mtd/mtd.h> |
15 | #include <linux/statfs.h> | 16 | #include <linux/statfs.h> |
16 | #include <linux/buffer_head.h> | 17 | #include <linux/buffer_head.h> |
@@ -136,6 +137,10 @@ static int logfs_sb_set(struct super_block *sb, void *_super) | |||
136 | sb->s_fs_info = super; | 137 | sb->s_fs_info = super; |
137 | sb->s_mtd = super->s_mtd; | 138 | sb->s_mtd = super->s_mtd; |
138 | sb->s_bdev = super->s_bdev; | 139 | 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; | ||
139 | return 0; | 144 | return 0; |
140 | } | 145 | } |
141 | 146 | ||