]> err.no Git - linux-2.6/blobdiff - fs/xfs/linux-2.6/xfs_export.c
powerpc: Only make kernel text pages of linear mapping executable
[linux-2.6] / fs / xfs / linux-2.6 / xfs_export.c
index 265f0168ab76ec9942a352e81421a1db23e71195..24fd598af84633876a169e7887818ac7742238fd 100644 (file)
@@ -133,13 +133,13 @@ xfs_nfs_get_inode(
        if (!ip)
                return ERR_PTR(-EIO);
 
-       if (!ip->i_d.di_mode || ip->i_d.di_gen != generation) {
+       if (ip->i_d.di_gen != generation) {
                xfs_iput_new(ip, XFS_ILOCK_SHARED);
                return ERR_PTR(-ENOENT);
        }
 
        xfs_iunlock(ip, XFS_ILOCK_SHARED);
-       return ip->i_vnode;
+       return VFS_I(ip);
 }
 
 STATIC struct dentry *
@@ -167,7 +167,7 @@ xfs_fs_fh_to_dentry(struct super_block *sb, struct fid *fid,
        if (!inode)
                return NULL;
        if (IS_ERR(inode))
-               return ERR_PTR(PTR_ERR(inode));
+               return ERR_CAST(inode);
        result = d_alloc_anon(inode);
        if (!result) {
                iput(inode);
@@ -198,7 +198,7 @@ xfs_fs_fh_to_parent(struct super_block *sb, struct fid *fid,
        if (!inode)
                return NULL;
        if (IS_ERR(inode))
-               return ERR_PTR(PTR_ERR(inode));
+               return ERR_CAST(inode);
        result = d_alloc_anon(inode);
        if (!result) {
                iput(inode);
@@ -215,13 +215,13 @@ xfs_fs_get_parent(
        struct xfs_inode        *cip;
        struct dentry           *parent;
 
-       error = xfs_lookup(XFS_I(child->d_inode), &xfs_name_dotdot, &cip);
+       error = xfs_lookup(XFS_I(child->d_inode), &xfs_name_dotdot, &cip, NULL);
        if (unlikely(error))
                return ERR_PTR(-error);
 
-       parent = d_alloc_anon(cip->i_vnode);
+       parent = d_alloc_anon(VFS_I(cip));
        if (unlikely(!parent)) {
-               iput(cip->i_vnode);
+               iput(VFS_I(cip));
                return ERR_PTR(-ENOMEM);
        }
        return parent;