diff options
Diffstat (limited to 'fs/exportfs/expfs.c')
-rw-r--r-- | fs/exportfs/expfs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/exportfs/expfs.c b/fs/exportfs/expfs.c index 645158dc33f1..c69927bed4ef 100644 --- a/fs/exportfs/expfs.c +++ b/fs/exportfs/expfs.c | |||
@@ -77,7 +77,7 @@ static bool dentry_connected(struct dentry *dentry) | |||
77 | struct dentry *parent = dget_parent(dentry); | 77 | struct dentry *parent = dget_parent(dentry); |
78 | 78 | ||
79 | dput(dentry); | 79 | dput(dentry); |
80 | if (IS_ROOT(dentry)) { | 80 | if (dentry == parent) { |
81 | dput(parent); | 81 | dput(parent); |
82 | return false; | 82 | return false; |
83 | } | 83 | } |
@@ -147,6 +147,7 @@ static struct dentry *reconnect_one(struct vfsmount *mnt, | |||
147 | tmp = lookup_one_len_unlocked(nbuf, parent, strlen(nbuf)); | 147 | tmp = lookup_one_len_unlocked(nbuf, parent, strlen(nbuf)); |
148 | if (IS_ERR(tmp)) { | 148 | if (IS_ERR(tmp)) { |
149 | dprintk("%s: lookup failed: %d\n", __func__, PTR_ERR(tmp)); | 149 | dprintk("%s: lookup failed: %d\n", __func__, PTR_ERR(tmp)); |
150 | err = PTR_ERR(tmp); | ||
150 | goto out_err; | 151 | goto out_err; |
151 | } | 152 | } |
152 | if (tmp != dentry) { | 153 | if (tmp != dentry) { |