JFS: Endian errors
authorDave Kleikamp <shaggy@austin.ibm.com>
Wed, 4 May 2005 14:11:49 +0000 (09:11 -0500)
committerDave Kleikamp <shaggy@austin.ibm.com>
Wed, 4 May 2005 14:11:49 +0000 (09:11 -0500)
Thanks sparse!

Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
fs/jfs/jfs_xtree.c

index 2c1f311914a101d9ee631327f0421956a8caa1a5..31b34db4519ec9cabc2668211177c3c2554d64e0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *   Copyright (C) International Business Machines Corp., 2000-2004
+ *   Copyright (C) International Business Machines Corp., 2000-2005
  *
  *   This program is free software;  you can redistribute it and/or modify
  *   it under the terms of the GNU General Public License as published by
@@ -688,7 +688,7 @@ static int xtSearch(struct inode *ip, s64 xoff,     s64 *nextp,
                                /* search hit - internal page:
                                 * descend/search its child page
                                 */
-                               if (index < p->header.nextindex - 1)
+                               if (index < le16_to_cpu(p->header.nextindex)-1)
                                        next = offsetXAD(&p->xad[index + 1]);
                                goto next;
                        }
@@ -705,7 +705,7 @@ static int xtSearch(struct inode *ip, s64 xoff,     s64 *nextp,
                 * base is the smallest index with key (Kj) greater than
                 * search key (K) and may be zero or maxentry index.
                 */
-               if (base < p->header.nextindex)
+               if (base < le16_to_cpu(p->header.nextindex))
                        next = offsetXAD(&p->xad[base]);
                /*
                 * search miss - leaf page: