From: Dave Kleikamp <shaggy@austin.ibm.com>

After Jose debugged the problem down to the routine jfs_get_parent, we
were able to find the problem.  I believe it only affects users of
NFS-exported JFS file systems on big-endian hardware.

The problem was a missing le32_to_cpu macro.  The patch also fixes a
return code to be more consistent other implementations of get_parent.



 25-akpm/fs/jfs/namei.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff -puN fs/jfs/namei.c~jfs-nfs-le-fix fs/jfs/namei.c
--- 25/fs/jfs/namei.c~jfs-nfs-le-fix	Wed Dec 17 13:43:32 2003
+++ 25-akpm/fs/jfs/namei.c	Wed Dec 17 13:43:32 2003
@@ -1439,14 +1439,18 @@ static struct dentry *jfs_lookup(struct 
 struct dentry *jfs_get_parent(struct dentry *dentry)
 {
 	struct super_block *sb = dentry->d_inode->i_sb;
-	struct dentry *parent = ERR_PTR(-EACCES);
+	struct dentry *parent = ERR_PTR(-ENOENT);
 	struct inode *inode;
+	unsigned long parent_ino;
 
-	inode = iget(sb, JFS_IP(dentry->d_inode)->i_dtroot.header.idotdot);
+	parent_ino =
+		le32_to_cpu(JFS_IP(dentry->d_inode)->i_dtroot.header.idotdot);
+	inode = iget(sb, parent_ino);
 	if (inode) {
-		if (is_bad_inode(inode))
+		if (is_bad_inode(inode)) {
 			iput(inode);
-		else {
+			parent = ERR_PTR(-EACCES);
+		} else {
 			parent = d_alloc_anon(inode);
 			if (!parent) {
 				parent = ERR_PTR(-ENOMEM);

_