aboutsummaryrefslogtreecommitdiffstats
path: root/fs/9p/fid.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/9p/fid.h')
-rw-r--r--fs/9p/fid.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/9p/fid.h b/fs/9p/fid.h
index dfa11df02818..1fed96546728 100644
--- a/fs/9p/fid.h
+++ b/fs/9p/fid.h
@@ -22,6 +22,14 @@ static inline struct p9_fid *clone_fid(struct p9_fid *fid)
}
static inline struct p9_fid *v9fs_fid_clone(struct dentry *dentry)
{
- return clone_fid(v9fs_fid_lookup(dentry));
+ struct p9_fid *fid, *nfid;
+
+ fid = v9fs_fid_lookup(dentry);
+ if (!fid || IS_ERR(fid))
+ return fid;
+
+ nfid = p9_client_walk(fid, 0, NULL, 1);
+ p9_client_clunk(fid);
+ return nfid;
}
#endif