diff options
author | Christoph Hellwig <hch@tuxera.com> | 2010-09-30 23:42:59 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2010-09-30 23:42:59 -0400 |
commit | dd73a01a30d729e8fa6f829c4582650e258e36f9 (patch) | |
tree | befe5a0bf762211d1a907ad11c15c4a21d7c4f74 /fs/hfsplus/btree.c | |
parent | e753a62156e952fd5a3c64f98454d9aeee3a2546 (diff) |
hfsplus: fix HFSPLUS_SB calling convention
HFSPLUS_SB doesn't return a pointer to the hfsplus-specific superblock
information like all other FOO_SB 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_SB macro is used directly and prevents us from keepig a local
hfsplus_sb_info pointer. Fix the calling convention and introduce a local
sbi 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.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/hfsplus/btree.c b/fs/hfsplus/btree.c index e49fcee1e293..96e2128748f2 100644 --- a/fs/hfsplus/btree.c +++ b/fs/hfsplus/btree.c | |||
@@ -61,12 +61,12 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id) | |||
61 | if (id == HFSPLUS_EXT_CNID) { | 61 | if (id == HFSPLUS_EXT_CNID) { |
62 | tree->keycmp = hfsplus_ext_cmp_key; | 62 | tree->keycmp = hfsplus_ext_cmp_key; |
63 | } else if (id == HFSPLUS_CAT_CNID) { | 63 | } else if (id == HFSPLUS_CAT_CNID) { |
64 | if ((HFSPLUS_SB(sb).flags & HFSPLUS_SB_HFSX) && | 64 | if ((HFSPLUS_SB(sb)->flags & HFSPLUS_SB_HFSX) && |
65 | (head->key_type == HFSPLUS_KEY_BINARY)) | 65 | (head->key_type == HFSPLUS_KEY_BINARY)) |
66 | tree->keycmp = hfsplus_cat_bin_cmp_key; | 66 | tree->keycmp = hfsplus_cat_bin_cmp_key; |
67 | else { | 67 | else { |
68 | tree->keycmp = hfsplus_cat_case_cmp_key; | 68 | tree->keycmp = hfsplus_cat_case_cmp_key; |
69 | HFSPLUS_SB(sb).flags |= HFSPLUS_SB_CASEFOLD; | 69 | HFSPLUS_SB(sb)->flags |= HFSPLUS_SB_CASEFOLD; |
70 | } | 70 | } |
71 | } else { | 71 | } else { |
72 | printk(KERN_ERR "hfs: unknown B*Tree requested\n"); | 72 | printk(KERN_ERR "hfs: unknown B*Tree requested\n"); |
@@ -200,9 +200,9 @@ struct hfs_bnode *hfs_bmap_alloc(struct hfs_btree *tree) | |||
200 | return ERR_PTR(res); | 200 | return ERR_PTR(res); |
201 | HFSPLUS_I(inode).phys_size = inode->i_size = | 201 | HFSPLUS_I(inode).phys_size = inode->i_size = |
202 | (loff_t)HFSPLUS_I(inode).alloc_blocks << | 202 | (loff_t)HFSPLUS_I(inode).alloc_blocks << |
203 | HFSPLUS_SB(tree->sb).alloc_blksz_shift; | 203 | HFSPLUS_SB(tree->sb)->alloc_blksz_shift; |
204 | HFSPLUS_I(inode).fs_blocks = HFSPLUS_I(inode).alloc_blocks << | 204 | HFSPLUS_I(inode).fs_blocks = HFSPLUS_I(inode).alloc_blocks << |
205 | HFSPLUS_SB(tree->sb).fs_shift; | 205 | HFSPLUS_SB(tree->sb)->fs_shift; |
206 | inode_set_bytes(inode, inode->i_size); | 206 | inode_set_bytes(inode, inode->i_size); |
207 | count = inode->i_size >> tree->node_size_shift; | 207 | count = inode->i_size >> tree->node_size_shift; |
208 | tree->free_nodes = count - tree->node_count; | 208 | tree->free_nodes = count - tree->node_count; |