From e3167ded1f1b16424bc14d5673cdc5414f179970 Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Thu, 30 Mar 2006 15:46:23 -0500 Subject: [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 --- fs/gfs2/recovery.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fs/gfs2/recovery.c') diff --git a/fs/gfs2/recovery.c b/fs/gfs2/recovery.c index 6c7e2e880e3..68c85610fb5 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, ld = (struct gfs2_log_descriptor *)bh->b_data; length = be32_to_cpu(ld->ld_length); - if (be16_to_cpu(ld->ld_header.mh_type) == GFS2_METATYPE_LH) { + if (be32_to_cpu(ld->ld_header.mh_type) == GFS2_METATYPE_LH) { struct gfs2_log_header lh; error = get_log_header(jd, start, &lh); if (!error) { @@ -400,7 +400,7 @@ static int clean_journal(struct gfs2_jdesc *jd, struct gfs2_log_header *head) memset(lh, 0, sizeof(struct gfs2_log_header)); lh->lh_header.mh_magic = cpu_to_be32(GFS2_MAGIC); lh->lh_header.mh_type = cpu_to_be16(GFS2_METATYPE_LH); - lh->lh_header.mh_format = cpu_to_be16(GFS2_FORMAT_LH); + lh->lh_header.mh_format = cpu_to_be32(GFS2_FORMAT_LH); lh->lh_sequence = cpu_to_be64(head->lh_sequence + 1); lh->lh_flags = cpu_to_be32(GFS2_LOG_HEAD_UNMOUNT); lh->lh_blkno = cpu_to_be32(lblock); -- cgit v1.2.3