From: Joern Engel Date: Sat, 17 Apr 2010 17:54:27 +0000 (+0200) Subject: [LogFS] Set s_bdi X-Git-Tag: v2.6.34-rc6~76^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b8639077abf034824046ed09e779b74c4393031f;p=platform%2Fupstream%2Fkernel-adaptation-pc.git [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 --- diff --git a/fs/logfs/super.c b/fs/logfs/super.c index d4531eb..dacce3a 100644 --- a/fs/logfs/super.c +++ b/fs/logfs/super.c @@ -11,6 +11,7 @@ */ #include "logfs.h" #include +#include #include #include #include @@ -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; }