aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfsplus/super.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/super.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/super.c')
-rw-r--r--fs/hfsplus/super.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c
index 1bf00b9ecc1a..a7bf89e85b3b 100644
--- a/fs/hfsplus/super.c
+++ b/fs/hfsplus/super.c
@@ -33,11 +33,11 @@ struct inode *hfsplus_iget(struct super_block *sb, unsigned long ino)
33 if (!(inode->i_state & I_NEW)) 33 if (!(inode->i_state & I_NEW))
34 return inode; 34 return inode;
35 35
36 INIT_LIST_HEAD(&HFSPLUS_I(inode).open_dir_list); 36 INIT_LIST_HEAD(&HFSPLUS_I(inode)->open_dir_list);
37 mutex_init(&HFSPLUS_I(inode).extents_lock); 37 mutex_init(&HFSPLUS_I(inode)->extents_lock);
38 HFSPLUS_I(inode).flags = 0; 38 HFSPLUS_I(inode)->flags = 0;
39 HFSPLUS_I(inode).rsrc_inode = NULL; 39 HFSPLUS_I(inode)->rsrc_inode = NULL;
40 atomic_set(&HFSPLUS_I(inode).opencnt, 0); 40 atomic_set(&HFSPLUS_I(inode)->opencnt, 0);
41 41
42 if (inode->i_ino >= HFSPLUS_FIRSTUSER_CNID) { 42 if (inode->i_ino >= HFSPLUS_FIRSTUSER_CNID) {
43 read_inode: 43 read_inode:
@@ -151,8 +151,8 @@ static void hfsplus_evict_inode(struct inode *inode)
151 truncate_inode_pages(&inode->i_data, 0); 151 truncate_inode_pages(&inode->i_data, 0);
152 end_writeback(inode); 152 end_writeback(inode);
153 if (HFSPLUS_IS_RSRC(inode)) { 153 if (HFSPLUS_IS_RSRC(inode)) {
154 HFSPLUS_I(HFSPLUS_I(inode).rsrc_inode).rsrc_inode = NULL; 154 HFSPLUS_I(HFSPLUS_I(inode)->rsrc_inode)->rsrc_inode = NULL;
155 iput(HFSPLUS_I(inode).rsrc_inode); 155 iput(HFSPLUS_I(inode)->rsrc_inode);
156 } 156 }
157} 157}
158 158
@@ -491,7 +491,7 @@ static struct inode *hfsplus_alloc_inode(struct super_block *sb)
491 491
492static void hfsplus_destroy_inode(struct inode *inode) 492static void hfsplus_destroy_inode(struct inode *inode)
493{ 493{
494 kmem_cache_free(hfsplus_inode_cachep, &HFSPLUS_I(inode)); 494 kmem_cache_free(hfsplus_inode_cachep, HFSPLUS_I(inode));
495} 495}
496 496
497#define HFSPLUS_INODE_SIZE sizeof(struct hfsplus_inode_info) 497#define HFSPLUS_INODE_SIZE sizeof(struct hfsplus_inode_info)