提交 bba0b5c2 编写于 作者: J Joern Engel

logfs: fix compile failure

When CONFIG_BLOCK is not enabled:

fs/logfs/super.c:142: error: implicit declaration of function 'bdev_get_queue'
fs/logfs/super.c:142: error: invalid type argument of '->' (have 'int')

Found by Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: NJoern Engel <joern@logfs.org>
上级 24797535
...@@ -138,10 +138,14 @@ static int logfs_sb_set(struct super_block *sb, void *_super) ...@@ -138,10 +138,14 @@ static int logfs_sb_set(struct super_block *sb, void *_super)
sb->s_fs_info = super; sb->s_fs_info = super;
sb->s_mtd = super->s_mtd; sb->s_mtd = super->s_mtd;
sb->s_bdev = super->s_bdev; sb->s_bdev = super->s_bdev;
#ifdef CONFIG_BLOCK
if (sb->s_bdev) if (sb->s_bdev)
sb->s_bdi = &bdev_get_queue(sb->s_bdev)->backing_dev_info; sb->s_bdi = &bdev_get_queue(sb->s_bdev)->backing_dev_info;
#endif
#ifdef CONFIG_MTD
if (sb->s_mtd) if (sb->s_mtd)
sb->s_bdi = sb->s_mtd->backing_dev_info; sb->s_bdi = sb->s_mtd->backing_dev_info;
#endif
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册