From: Al Viro <viro@www.linux.org.uk>

fixes for a couple of bugs exposed by the above: le32_to_cpu() used on 16bit
value and missing conversion in comparison of host- and little-endian values.

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Cc: <reiserfs-dev@namesys.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 fs/reiserfs/journal.c       |    2 +-
 include/linux/reiserfs_fs.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff -puN fs/reiserfs/journal.c~reiserfs-endianness-fix-endianness-bugs fs/reiserfs/journal.c
--- 25/fs/reiserfs/journal.c~reiserfs-endianness-fix-endianness-bugs	2005-04-26 20:29:35.068869504 -0700
+++ 25-akpm/fs/reiserfs/journal.c	2005-04-26 20:29:35.076868288 -0700
@@ -2401,7 +2401,7 @@ int journal_init(struct super_block *p_s
      jh = (struct reiserfs_journal_header *)(bhjh->b_data);
      
      /* make sure that journal matches to the super block */
-     if (is_reiserfs_jr(rs) && (jh->jh_journal.jp_journal_magic != sb_jp_journal_magic(rs))) {
+     if (is_reiserfs_jr(rs) && (le32_to_cpu(jh->jh_journal.jp_journal_magic) != sb_jp_journal_magic(rs))) {
 	 reiserfs_warning (p_s_sb, "sh-460: journal header magic %x "
 			   "(device %s) does not match to magic found in super "
 			   "block %x",
diff -puN include/linux/reiserfs_fs.h~reiserfs-endianness-fix-endianness-bugs include/linux/reiserfs_fs.h
--- 25/include/linux/reiserfs_fs.h~reiserfs-endianness-fix-endianness-bugs	2005-04-26 20:29:35.070869200 -0700
+++ 25-akpm/include/linux/reiserfs_fs.h	2005-04-26 20:29:35.079867832 -0700
@@ -225,7 +225,7 @@ struct reiserfs_super_block
 #define SB_ONDISK_JOURNAL_DEVICE(s) \
          le32_to_cpu ((SB_ONDISK_JP(s)->jp_journal_dev))
 #define SB_ONDISK_RESERVED_FOR_JOURNAL(s) \
-         le32_to_cpu ((SB_V1_DISK_SUPER_BLOCK(s)->s_reserved_for_journal))
+         le16_to_cpu ((SB_V1_DISK_SUPER_BLOCK(s)->s_reserved_for_journal))
 
 #define is_block_in_log_or_reserved_area(s, block) \
          block >= SB_JOURNAL_1st_RESERVED_BLOCK(s) \
_