diff options
author | Christoph Hellwig <hch@tuxera.com> | 2010-09-30 23:43:31 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2010-09-30 23:43:31 -0400 |
commit | 6af502de224c3742936d54eee7e3690c09822934 (patch) | |
tree | 9988331693952348503d64764ff81dc3b5d801ab /fs/hfsplus/catalog.c | |
parent | dd73a01a30d729e8fa6f829c4582650e258e36f9 (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/catalog.c')
-rw-r--r-- | fs/hfsplus/catalog.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/hfsplus/catalog.c b/fs/hfsplus/catalog.c index 75ac1e466f1c..48979c4e8fa5 100644 --- a/fs/hfsplus/catalog.c +++ b/fs/hfsplus/catalog.c | |||
@@ -77,8 +77,8 @@ static void hfsplus_set_perms(struct inode *inode, struct hfsplus_perm *perms) | |||
77 | perms->rootflags |= HFSPLUS_FLG_APPEND; | 77 | perms->rootflags |= HFSPLUS_FLG_APPEND; |
78 | else | 78 | else |
79 | perms->rootflags &= ~HFSPLUS_FLG_APPEND; | 79 | perms->rootflags &= ~HFSPLUS_FLG_APPEND; |
80 | HFSPLUS_I(inode).rootflags = perms->rootflags; | 80 | HFSPLUS_I(inode)->rootflags = perms->rootflags; |
81 | HFSPLUS_I(inode).userflags = perms->userflags; | 81 | HFSPLUS_I(inode)->userflags = perms->userflags; |
82 | perms->mode = cpu_to_be16(inode->i_mode); | 82 | perms->mode = cpu_to_be16(inode->i_mode); |
83 | perms->owner = cpu_to_be32(inode->i_uid); | 83 | perms->owner = cpu_to_be32(inode->i_uid); |
84 | perms->group = cpu_to_be32(inode->i_gid); | 84 | perms->group = cpu_to_be32(inode->i_gid); |
@@ -95,7 +95,7 @@ static int hfsplus_cat_build_record(hfsplus_cat_entry *entry, u32 cnid, struct i | |||
95 | memset(folder, 0, sizeof(*folder)); | 95 | memset(folder, 0, sizeof(*folder)); |
96 | folder->type = cpu_to_be16(HFSPLUS_FOLDER); | 96 | folder->type = cpu_to_be16(HFSPLUS_FOLDER); |
97 | folder->id = cpu_to_be32(inode->i_ino); | 97 | folder->id = cpu_to_be32(inode->i_ino); |
98 | HFSPLUS_I(inode).create_date = | 98 | HFSPLUS_I(inode)->create_date = |
99 | folder->create_date = | 99 | folder->create_date = |
100 | folder->content_mod_date = | 100 | folder->content_mod_date = |
101 | folder->attribute_mod_date = | 101 | folder->attribute_mod_date = |
@@ -113,7 +113,7 @@ static int hfsplus_cat_build_record(hfsplus_cat_entry *entry, u32 cnid, struct i | |||
113 | file->type = cpu_to_be16(HFSPLUS_FILE); | 113 | file->type = cpu_to_be16(HFSPLUS_FILE); |
114 | file->flags = cpu_to_be16(HFSPLUS_FILE_THREAD_EXISTS); | 114 | file->flags = cpu_to_be16(HFSPLUS_FILE_THREAD_EXISTS); |
115 | file->id = cpu_to_be32(cnid); | 115 | file->id = cpu_to_be32(cnid); |
116 | HFSPLUS_I(inode).create_date = | 116 | HFSPLUS_I(inode)->create_date = |
117 | file->create_date = | 117 | file->create_date = |
118 | file->content_mod_date = | 118 | file->content_mod_date = |
119 | file->attribute_mod_date = | 119 | file->attribute_mod_date = |
@@ -133,8 +133,8 @@ static int hfsplus_cat_build_record(hfsplus_cat_entry *entry, u32 cnid, struct i | |||
133 | file->user_info.fdType = cpu_to_be32(HFSP_HARDLINK_TYPE); | 133 | file->user_info.fdType = cpu_to_be32(HFSP_HARDLINK_TYPE); |
134 | file->user_info.fdCreator = cpu_to_be32(HFSP_HFSPLUS_CREATOR); | 134 | file->user_info.fdCreator = cpu_to_be32(HFSP_HFSPLUS_CREATOR); |
135 | file->user_info.fdFlags = cpu_to_be16(0x100); | 135 | file->user_info.fdFlags = cpu_to_be16(0x100); |
136 | file->create_date = HFSPLUS_I(sbi->hidden_dir).create_date; | 136 | file->create_date = HFSPLUS_I(sbi->hidden_dir)->create_date; |
137 | file->permissions.dev = cpu_to_be32(HFSPLUS_I(inode).dev); | 137 | file->permissions.dev = cpu_to_be32(HFSPLUS_I(inode)->dev); |
138 | } | 138 | } |
139 | return sizeof(*file); | 139 | return sizeof(*file); |
140 | } | 140 | } |
@@ -279,7 +279,7 @@ int hfsplus_delete_cat(u32 cnid, struct inode *dir, struct qstr *str) | |||
279 | hfsplus_free_fork(sb, cnid, &fork, HFSPLUS_TYPE_RSRC); | 279 | hfsplus_free_fork(sb, cnid, &fork, HFSPLUS_TYPE_RSRC); |
280 | } | 280 | } |
281 | 281 | ||
282 | list_for_each(pos, &HFSPLUS_I(dir).open_dir_list) { | 282 | list_for_each(pos, &HFSPLUS_I(dir)->open_dir_list) { |
283 | struct hfsplus_readdir_data *rd = | 283 | struct hfsplus_readdir_data *rd = |
284 | list_entry(pos, struct hfsplus_readdir_data, list); | 284 | list_entry(pos, struct hfsplus_readdir_data, list); |
285 | if (fd.tree->keycmp(fd.search_key, (void *)&rd->key) < 0) | 285 | if (fd.tree->keycmp(fd.search_key, (void *)&rd->key) < 0) |