diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-10-31 15:28:00 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-11-30 10:34:00 -0500 |
commit | ea744d01c6a5acf1f6171b4c6e1658a742063613 (patch) | |
tree | 6157f726ee369f9caec62c11093f4dde1da4ff42 /fs/gfs2 | |
parent | 891ea14712da68e282de8583e5fa14f0d3f3731e (diff) |
[GFS2] Move gfs2_dinode_in to inode.c
gfs2_dinode_in() is only ever called from one place, so move it
to that place (in inode.c) and make it static.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r-- | fs/gfs2/inode.c | 34 | ||||
-rw-r--r-- | fs/gfs2/ondisk.c | 36 |
2 files changed, 35 insertions, 35 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index 9875e9356cd3..b39cfcfe9276 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c | |||
@@ -208,6 +208,40 @@ fail: | |||
208 | return ERR_PTR(error); | 208 | return ERR_PTR(error); |
209 | } | 209 | } |
210 | 210 | ||
211 | static void gfs2_dinode_in(struct gfs2_inode *ip, const void *buf) | ||
212 | { | ||
213 | struct gfs2_dinode_host *di = &ip->i_di; | ||
214 | const struct gfs2_dinode *str = buf; | ||
215 | |||
216 | gfs2_meta_header_in(&di->di_header, buf); | ||
217 | gfs2_inum_in(&di->di_num, &str->di_num); | ||
218 | |||
219 | di->di_mode = be32_to_cpu(str->di_mode); | ||
220 | di->di_uid = be32_to_cpu(str->di_uid); | ||
221 | di->di_gid = be32_to_cpu(str->di_gid); | ||
222 | di->di_nlink = be32_to_cpu(str->di_nlink); | ||
223 | di->di_size = be64_to_cpu(str->di_size); | ||
224 | di->di_blocks = be64_to_cpu(str->di_blocks); | ||
225 | di->di_atime = be64_to_cpu(str->di_atime); | ||
226 | di->di_mtime = be64_to_cpu(str->di_mtime); | ||
227 | di->di_ctime = be64_to_cpu(str->di_ctime); | ||
228 | di->di_major = be32_to_cpu(str->di_major); | ||
229 | di->di_minor = be32_to_cpu(str->di_minor); | ||
230 | |||
231 | di->di_goal_meta = be64_to_cpu(str->di_goal_meta); | ||
232 | di->di_goal_data = be64_to_cpu(str->di_goal_data); | ||
233 | di->di_generation = be64_to_cpu(str->di_generation); | ||
234 | |||
235 | di->di_flags = be32_to_cpu(str->di_flags); | ||
236 | di->di_payload_format = be32_to_cpu(str->di_payload_format); | ||
237 | di->di_height = be16_to_cpu(str->di_height); | ||
238 | |||
239 | di->di_depth = be16_to_cpu(str->di_depth); | ||
240 | di->di_entries = be32_to_cpu(str->di_entries); | ||
241 | |||
242 | di->di_eattr = be64_to_cpu(str->di_eattr); | ||
243 | } | ||
244 | |||
211 | /** | 245 | /** |
212 | * gfs2_inode_refresh - Refresh the incore copy of the dinode | 246 | * gfs2_inode_refresh - Refresh the incore copy of the dinode |
213 | * @ip: The GFS2 inode | 247 | * @ip: The GFS2 inode |
diff --git a/fs/gfs2/ondisk.c b/fs/gfs2/ondisk.c index edf87567bb2b..062a44f87fec 100644 --- a/fs/gfs2/ondisk.c +++ b/fs/gfs2/ondisk.c | |||
@@ -56,7 +56,7 @@ static void gfs2_inum_print(const struct gfs2_inum_host *no) | |||
56 | printk(KERN_INFO " no_addr = %llu\n", (unsigned long long)no->no_addr); | 56 | printk(KERN_INFO " no_addr = %llu\n", (unsigned long long)no->no_addr); |
57 | } | 57 | } |
58 | 58 | ||
59 | static void gfs2_meta_header_in(struct gfs2_meta_header_host *mh, const void *buf) | 59 | void gfs2_meta_header_in(struct gfs2_meta_header_host *mh, const void *buf) |
60 | { | 60 | { |
61 | const struct gfs2_meta_header *str = buf; | 61 | const struct gfs2_meta_header *str = buf; |
62 | 62 | ||
@@ -155,40 +155,6 @@ void gfs2_quota_in(struct gfs2_quota_host *qu, const void *buf) | |||
155 | qu->qu_value = be64_to_cpu(str->qu_value); | 155 | qu->qu_value = be64_to_cpu(str->qu_value); |
156 | } | 156 | } |
157 | 157 | ||
158 | void gfs2_dinode_in(struct gfs2_inode *ip, const void *buf) | ||
159 | { | ||
160 | struct gfs2_dinode_host *di = &ip->i_di; | ||
161 | const struct gfs2_dinode *str = buf; | ||
162 | |||
163 | gfs2_meta_header_in(&di->di_header, buf); | ||
164 | gfs2_inum_in(&di->di_num, &str->di_num); | ||
165 | |||
166 | di->di_mode = be32_to_cpu(str->di_mode); | ||
167 | di->di_uid = be32_to_cpu(str->di_uid); | ||
168 | di->di_gid = be32_to_cpu(str->di_gid); | ||
169 | di->di_nlink = be32_to_cpu(str->di_nlink); | ||
170 | di->di_size = be64_to_cpu(str->di_size); | ||
171 | di->di_blocks = be64_to_cpu(str->di_blocks); | ||
172 | di->di_atime = be64_to_cpu(str->di_atime); | ||
173 | di->di_mtime = be64_to_cpu(str->di_mtime); | ||
174 | di->di_ctime = be64_to_cpu(str->di_ctime); | ||
175 | di->di_major = be32_to_cpu(str->di_major); | ||
176 | di->di_minor = be32_to_cpu(str->di_minor); | ||
177 | |||
178 | di->di_goal_meta = be64_to_cpu(str->di_goal_meta); | ||
179 | di->di_goal_data = be64_to_cpu(str->di_goal_data); | ||
180 | di->di_generation = be64_to_cpu(str->di_generation); | ||
181 | |||
182 | di->di_flags = be32_to_cpu(str->di_flags); | ||
183 | di->di_payload_format = be32_to_cpu(str->di_payload_format); | ||
184 | di->di_height = be16_to_cpu(str->di_height); | ||
185 | |||
186 | di->di_depth = be16_to_cpu(str->di_depth); | ||
187 | di->di_entries = be32_to_cpu(str->di_entries); | ||
188 | |||
189 | di->di_eattr = be64_to_cpu(str->di_eattr); | ||
190 | } | ||
191 | |||
192 | void gfs2_dinode_out(const struct gfs2_inode *ip, void *buf) | 158 | void gfs2_dinode_out(const struct gfs2_inode *ip, void *buf) |
193 | { | 159 | { |
194 | const struct gfs2_dinode_host *di = &ip->i_di; | 160 | const struct gfs2_dinode_host *di = &ip->i_di; |