diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-08-03 18:02:48 +0300 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-08-03 18:02:48 +0300 |
commit | 797fc16d8f00bf681b7f9969c0701725b472b11a (patch) | |
tree | 086e31f304992724b5e92eac90688601d29d7134 /fs/9p/fid.h | |
parent | 6fa67e707559303e086303aeecc9e8b91ef497d5 (diff) | |
download | linux-797fc16d8f00bf681b7f9969c0701725b472b11a.tar.xz |
9p: fix braino introduced in "9p: new helper - v9fs_parent_fid()"
In v9fs_vfs_rename() we need to clone the parents' fids, not just
find them.
Spotted-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/9p/fid.h')
-rw-r--r-- | fs/9p/fid.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/9p/fid.h b/fs/9p/fid.h index 12700df0bb51..d4c5002d56ad 100644 --- a/fs/9p/fid.h +++ b/fs/9p/fid.h @@ -31,4 +31,8 @@ static inline struct p9_fid *v9fs_parent_fid(struct dentry *dentry) struct p9_fid *v9fs_fid_clone(struct dentry *dentry); void v9fs_fid_add(struct dentry *dentry, struct p9_fid *fid); struct p9_fid *v9fs_writeback_fid(struct dentry *dentry); +static inline struct p9_fid *clone_fid(struct p9_fid *fid) +{ + return IS_ERR(fid) ? fid : p9_client_walk(fid, 0, NULL, 1); +} #endif |