aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfsplus/btree.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@tuxera.com>2010-09-30 23:43:31 -0400
committerChristoph Hellwig <hch@lst.de>2010-09-30 23:43:31 -0400
commit6af502de224c3742936d54eee7e3690c09822934 (patch)
tree9988331693952348503d64764ff81dc3b5d801ab /fs/hfsplus/btree.c
parentdd73a01a30d729e8fa6f829c4582650e258e36f9 (diff)
hfsplus: fix HFSPLUS_I calling convention
HFSPLUS_I doesn't return a pointer to the hfsplus-specific inode information like all other FOO_I macros, but dereference the pointer in a way that made it look like a direct struct derefence. This only works as long as the HFSPLUS_I macro is used directly and prevents us from keepig a local hfsplus_inode_info pointer. Fix the calling convention and introduce a local hip variable in all functions that use it constantly. Signed-off-by: Christoph Hellwig <hch@tuxera.com>
Diffstat (limited to 'fs/hfsplus/btree.c')
-rw-r--r--fs/hfsplus/btree.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/hfsplus/btree.c b/fs/hfsplus/btree.c
index 96e2128748f2..f75cf222b8b4 100644
--- a/fs/hfsplus/btree.c
+++ b/fs/hfsplus/btree.c
@@ -192,17 +192,18 @@ struct hfs_bnode *hfs_bmap_alloc(struct hfs_btree *tree)
192 192
193 while (!tree->free_nodes) { 193 while (!tree->free_nodes) {
194 struct inode *inode = tree->inode; 194 struct inode *inode = tree->inode;
195 struct hfsplus_inode_info *hip = HFSPLUS_I(inode);
195 u32 count; 196 u32 count;
196 int res; 197 int res;
197 198
198 res = hfsplus_file_extend(inode); 199 res = hfsplus_file_extend(inode);
199 if (res) 200 if (res)
200 return ERR_PTR(res); 201 return ERR_PTR(res);
201 HFSPLUS_I(inode).phys_size = inode->i_size = 202 hip->phys_size = inode->i_size =
202 (loff_t)HFSPLUS_I(inode).alloc_blocks << 203 (loff_t)hip->alloc_blocks <<
203 HFSPLUS_SB(tree->sb)->alloc_blksz_shift; 204 HFSPLUS_SB(tree->sb)->alloc_blksz_shift;
204 HFSPLUS_I(inode).fs_blocks = HFSPLUS_I(inode).alloc_blocks << 205 hip->fs_blocks =
205 HFSPLUS_SB(tree->sb)->fs_shift; 206 hip->alloc_blocks << HFSPLUS_SB(tree->sb)->fs_shift;
206 inode_set_bytes(inode, inode->i_size); 207 inode_set_bytes(inode, inode->i_size);
207 count = inode->i_size >> tree->node_size_shift; 208 count = inode->i_size >> tree->node_size_shift;
208 tree->free_nodes = count - tree->node_count; 209 tree->free_nodes = count - tree->node_count;