aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/ops_export.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/ops_export.c')
-rw-r--r--fs/gfs2/ops_export.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/fs/gfs2/ops_export.c b/fs/gfs2/ops_export.c
index a346943363c6..b27bce74a795 100644
--- a/fs/gfs2/ops_export.c
+++ b/fs/gfs2/ops_export.c
@@ -24,6 +24,7 @@
24#include "inode.h" 24#include "inode.h"
25#include "ops_export.h" 25#include "ops_export.h"
26#include "rgrp.h" 26#include "rgrp.h"
27#include "util.h"
27 28
28static struct dentry *gfs2_decode_fh(struct super_block *sb, 29static struct dentry *gfs2_decode_fh(struct super_block *sb,
29 __u32 *fh, 30 __u32 *fh,
@@ -167,11 +168,15 @@ static struct dentry *gfs2_get_parent(struct dentry *child)
167 struct qstr dotdot = { .name = "..", .len = 2 }; 168 struct qstr dotdot = { .name = "..", .len = 2 };
168 struct inode *inode; 169 struct inode *inode;
169 struct dentry *dentry; 170 struct dentry *dentry;
170 int error;
171 171
172 error = gfs2_lookupi(child->d_inode, &dotdot, 1, &inode); 172 dotdot.hash = gfs2_disk_hash(dotdot.name, dotdot.len);
173 if (error) 173
174 return ERR_PTR(error); 174 inode = gfs2_lookupi(child->d_inode, &dotdot, 1, NULL);
175
176 if (!inode)
177 return ERR_PTR(-ENOENT);
178 if (IS_ERR(inode))
179 return ERR_PTR(PTR_ERR(inode));
175 180
176 dentry = d_alloc_anon(inode); 181 dentry = d_alloc_anon(inode);
177 if (!dentry) { 182 if (!dentry) {