summaryrefslogtreecommitdiffstats
path: root/fs/9p/vfs_inode.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-08-03 17:02:48 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2016-08-03 17:02:48 +0200
commit797fc16d8f00bf681b7f9969c0701725b472b11a (patch)
tree086e31f304992724b5e92eac90688601d29d7134 /fs/9p/vfs_inode.c
parentget rid of 'parent' argument of ->d_compare() (diff)
downloadlinux-797fc16d8f00bf681b7f9969c0701725b472b11a.tar.xz
linux-797fc16d8f00bf681b7f9969c0701725b472b11a.zip
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/vfs_inode.c')
-rw-r--r--fs/9p/vfs_inode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 7da9a8354fad..26189eebcd1c 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -975,13 +975,13 @@ v9fs_vfs_rename(struct inode *old_dir, struct dentry *old_dentry,
if (IS_ERR(oldfid))
return PTR_ERR(oldfid);
- olddirfid = v9fs_parent_fid(old_dentry);
+ olddirfid = clone_fid(v9fs_parent_fid(old_dentry));
if (IS_ERR(olddirfid)) {
retval = PTR_ERR(olddirfid);
goto done;
}
- newdirfid = v9fs_parent_fid(new_dentry);
+ newdirfid = clone_fid(v9fs_parent_fid(new_dentry));
if (IS_ERR(newdirfid)) {
retval = PTR_ERR(newdirfid);
goto clunk_olddir;