aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/ondisk.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-03-30 15:46:23 -0500
committerSteven Whitehouse <swhiteho@redhat.com>2006-03-30 15:46:23 -0500
commite3167ded1f1b16424bc14d5673cdc5414f179970 (patch)
tree1b995e6387b230b1f447aabe30b689d091ee0b52 /fs/gfs2/ondisk.c
parentcd45697f0ddbb58f3f83c29fe164713ee7765e21 (diff)
[GFS] Fix bug in endian conversion for metadata header
In some cases 16 bit functions were being used rather than 32 bit functions. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/ondisk.c')
-rw-r--r--fs/gfs2/ondisk.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/gfs2/ondisk.c b/fs/gfs2/ondisk.c
index 3be060f1cbe7..acfc944ce13e 100644
--- a/fs/gfs2/ondisk.c
+++ b/fs/gfs2/ondisk.c
@@ -83,8 +83,8 @@ static void gfs2_meta_header_in(struct gfs2_meta_header *mh, char *buf)
83 struct gfs2_meta_header *str = (struct gfs2_meta_header *)buf; 83 struct gfs2_meta_header *str = (struct gfs2_meta_header *)buf;
84 84
85 mh->mh_magic = be32_to_cpu(str->mh_magic); 85 mh->mh_magic = be32_to_cpu(str->mh_magic);
86 mh->mh_type = be16_to_cpu(str->mh_type); 86 mh->mh_type = be32_to_cpu(str->mh_type);
87 mh->mh_format = be16_to_cpu(str->mh_format); 87 mh->mh_format = be32_to_cpu(str->mh_format);
88} 88}
89 89
90static void gfs2_meta_header_out(struct gfs2_meta_header *mh, char *buf) 90static void gfs2_meta_header_out(struct gfs2_meta_header *mh, char *buf)
@@ -92,8 +92,8 @@ static void gfs2_meta_header_out(struct gfs2_meta_header *mh, char *buf)
92 struct gfs2_meta_header *str = (struct gfs2_meta_header *)buf; 92 struct gfs2_meta_header *str = (struct gfs2_meta_header *)buf;
93 93
94 str->mh_magic = cpu_to_be32(mh->mh_magic); 94 str->mh_magic = cpu_to_be32(mh->mh_magic);
95 str->mh_type = cpu_to_be16(mh->mh_type); 95 str->mh_type = cpu_to_be32(mh->mh_type);
96 str->mh_format = cpu_to_be16(mh->mh_format); 96 str->mh_format = cpu_to_be32(mh->mh_format);
97} 97}
98 98
99void gfs2_meta_header_print(struct gfs2_meta_header *mh) 99void gfs2_meta_header_print(struct gfs2_meta_header *mh)