From: NeilBrown Date: Fri, 4 Mar 2011 23:44:23 +0000 (+1100) Subject: Make sure the inode's bdi matches the superblock. X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=fbac75a1d6f33cd2b6070934089921e3b1ca038e;p=LaFS.git Make sure the inode's bdi matches the superblock. inode_init_always defaults i_data.backing_dev_info to the bdi for sb->s_bdev if that exists, otherwise default_backing_dev_info. Why it doesn't just use sb->s_bdi is not clear. But in any case it doesn't so we must. Signed-off-by: NeilBrown --- diff --git a/inode.c b/inode.c index 956b680..e66ea28 100644 --- a/inode.c +++ b/inode.c @@ -149,6 +149,10 @@ lafs_iget(struct super_block *sb, ino_t inum, int async) return ERR_PTR(-ENOENT); } + /* surprisingly the inode bdi does not default to the + * super_blocks bdi... + */ + ino->i_data.backing_dev_info = sb->s_bdi; /* Need to load block 'inum' from an inode file... */ if (!b) {