X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fhfsplus%2Fbtree.c;h=44326aa2bd34b927099b2397ea62c070b28849cf;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=25119fd1a82b57fce4d1170ef8ae045e744066a9;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/fs/hfsplus/btree.c b/fs/hfsplus/btree.c index 25119fd1a..44326aa2b 100644 --- a/fs/hfsplus/btree.c +++ b/fs/hfsplus/btree.c @@ -187,10 +187,12 @@ struct hfs_bnode *hfs_bmap_alloc(struct hfs_btree *tree) res = hfsplus_file_extend(inode); if (res) return ERR_PTR(res); - inode->i_blocks = HFSPLUS_I(inode).alloc_blocks << - HFSPLUS_SB(tree->sb).fs_shift; HFSPLUS_I(inode).phys_size = inode->i_size = - (loff_t)inode->i_blocks << tree->sb->s_blocksize_bits; + (loff_t)HFSPLUS_I(inode).alloc_blocks << + HFSPLUS_SB(tree->sb).alloc_blksz_shift; + HFSPLUS_I(inode).fs_blocks = HFSPLUS_I(inode).alloc_blocks << + HFSPLUS_SB(tree->sb).fs_shift; + inode_set_bytes(inode, inode->i_size); count = inode->i_size >> tree->node_size_shift; tree->free_nodes = count - tree->node_count; tree->node_count = count;