diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-03-30 15:46:23 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-03-30 15:46:23 -0500 |
commit | e3167ded1f1b16424bc14d5673cdc5414f179970 (patch) | |
tree | 1b995e6387b230b1f447aabe30b689d091ee0b52 /fs/gfs2/recovery.c | |
parent | cd45697f0ddbb58f3f83c29fe164713ee7765e21 (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/recovery.c')
-rw-r--r-- | fs/gfs2/recovery.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/gfs2/recovery.c b/fs/gfs2/recovery.c index 6c7e2e880e32..68c85610fb5b 100644 --- a/fs/gfs2/recovery.c +++ b/fs/gfs2/recovery.c | |||
@@ -324,7 +324,7 @@ static int foreach_descriptor(struct gfs2_jdesc *jd, unsigned int start, | |||
324 | ld = (struct gfs2_log_descriptor *)bh->b_data; | 324 | ld = (struct gfs2_log_descriptor *)bh->b_data; |
325 | length = be32_to_cpu(ld->ld_length); | 325 | length = be32_to_cpu(ld->ld_length); |
326 | 326 | ||
327 | if (be16_to_cpu(ld->ld_header.mh_type) == GFS2_METATYPE_LH) { | 327 | if (be32_to_cpu(ld->ld_header.mh_type) == GFS2_METATYPE_LH) { |
328 | struct gfs2_log_header lh; | 328 | struct gfs2_log_header lh; |
329 | error = get_log_header(jd, start, &lh); | 329 | error = get_log_header(jd, start, &lh); |
330 | if (!error) { | 330 | if (!error) { |
@@ -400,7 +400,7 @@ static int clean_journal(struct gfs2_jdesc *jd, struct gfs2_log_header *head) | |||
400 | memset(lh, 0, sizeof(struct gfs2_log_header)); | 400 | memset(lh, 0, sizeof(struct gfs2_log_header)); |
401 | lh->lh_header.mh_magic = cpu_to_be32(GFS2_MAGIC); | 401 | lh->lh_header.mh_magic = cpu_to_be32(GFS2_MAGIC); |
402 | lh->lh_header.mh_type = cpu_to_be16(GFS2_METATYPE_LH); | 402 | lh->lh_header.mh_type = cpu_to_be16(GFS2_METATYPE_LH); |
403 | lh->lh_header.mh_format = cpu_to_be16(GFS2_FORMAT_LH); | 403 | lh->lh_header.mh_format = cpu_to_be32(GFS2_FORMAT_LH); |
404 | lh->lh_sequence = cpu_to_be64(head->lh_sequence + 1); | 404 | lh->lh_sequence = cpu_to_be64(head->lh_sequence + 1); |
405 | lh->lh_flags = cpu_to_be32(GFS2_LOG_HEAD_UNMOUNT); | 405 | lh->lh_flags = cpu_to_be32(GFS2_LOG_HEAD_UNMOUNT); |
406 | lh->lh_blkno = cpu_to_be32(lblock); | 406 | lh->lh_blkno = cpu_to_be32(lblock); |