aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/fuse/dir.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index 9d0ef5e18740..cfc8f81e60d0 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -138,6 +138,7 @@ static int fuse_dentry_revalidate(struct dentry *entry, struct nameidata *nd)
138 struct fuse_entry_out outarg; 138 struct fuse_entry_out outarg;
139 struct fuse_conn *fc; 139 struct fuse_conn *fc;
140 struct fuse_req *req; 140 struct fuse_req *req;
141 struct dentry *parent;
141 142
142 /* Doesn't hurt to "reset" the validity timeout */ 143 /* Doesn't hurt to "reset" the validity timeout */
143 fuse_invalidate_entry_cache(entry); 144 fuse_invalidate_entry_cache(entry);
@@ -151,8 +152,10 @@ static int fuse_dentry_revalidate(struct dentry *entry, struct nameidata *nd)
151 if (IS_ERR(req)) 152 if (IS_ERR(req))
152 return 0; 153 return 0;
153 154
154 fuse_lookup_init(req, entry->d_parent->d_inode, entry, &outarg); 155 parent = dget_parent(entry);
156 fuse_lookup_init(req, parent->d_inode, entry, &outarg);
155 request_send(fc, req); 157 request_send(fc, req);
158 dput(parent);
156 err = req->out.h.error; 159 err = req->out.h.error;
157 /* Zero nodeid is same as -ENOENT */ 160 /* Zero nodeid is same as -ENOENT */
158 if (!err && !outarg.nodeid) 161 if (!err && !outarg.nodeid)