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/dir.c | |
parent | cd45697f0ddbb58f3f83c29fe164713ee7765e21 (diff) | |
download | linux-e3167ded1f1b16424bc14d5673cdc5414f179970.tar.bz2 |
[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/dir.c')
-rw-r--r-- | fs/gfs2/dir.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index 9f17e7d05af1..66917f2c64aa 100644 --- a/fs/gfs2/dir.c +++ b/fs/gfs2/dir.c @@ -462,7 +462,7 @@ static int gfs2_dirent_offset(const void *buf) BUG_ON(buf == NULL); - switch(be16_to_cpu(h->mh_type)) { + switch(be32_to_cpu(h->mh_type)) { case GFS2_METATYPE_LF: offset = sizeof(struct gfs2_leaf); break; @@ -475,7 +475,7 @@ static int gfs2_dirent_offset(const void *buf) return offset; wrong_type: printk(KERN_WARNING "gfs2_scan_dirent: wrong block type %u\n", - be16_to_cpu(h->mh_type)); + be32_to_cpu(h->mh_type)); return -1; } @@ -548,7 +548,7 @@ static int dirent_first(struct gfs2_inode *dip, struct buffer_head *bh, { struct gfs2_meta_header *h = (struct gfs2_meta_header *)bh->b_data; - if (be16_to_cpu(h->mh_type) == GFS2_METATYPE_LF) { + if (be32_to_cpu(h->mh_type) == GFS2_METATYPE_LF) { if (gfs2_meta_check(dip->i_sbd, bh)) return -EIO; *dent = (struct gfs2_dirent *)(bh->b_data + |