summaryrefslogtreecommitdiffstats
path: root/fs/namei.c
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2016-12-16 11:02:54 +0100
committerMiklos Szeredi <mszeredi@redhat.com>2016-12-16 11:02:54 +0100
commit8d3e2936375bacce6abacbce3917d667e4133409 (patch)
tree9dc2f02fe2f719c8fba397c884ff4e4dacb54eb2 /fs/namei.c
parentbeef5121f3a4d1566c8ab8cd99b4e001862048cf (diff)
downloadlinux-stable-8d3e2936375bacce6abacbce3917d667e4133409.tar.gz
linux-stable-8d3e2936375bacce6abacbce3917d667e4133409.tar.bz2
linux-stable-8d3e2936375bacce6abacbce3917d667e4133409.zip
Revert "vfs: rename: check backing inode being equal"
This reverts commit 9409e22acdfc9153f88d9b1ed2bd2a5b34d2d3ca. Since commit 51f7e52dc943 ("ovl: share inode for hard link") there's no need to call d_real_inode() to check two overlay inodes for equality. Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/namei.c')
-rw-r--r--fs/namei.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 5b4eed221530..31d04d993a2d 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -4345,11 +4345,7 @@ int vfs_rename(struct inode *old_dir, struct dentry *old_dentry,
bool new_is_dir = false;
unsigned max_links = new_dir->i_sb->s_max_links;
- /*
- * Check source == target.
- * On overlayfs need to look at underlying inodes.
- */
- if (d_real_inode(old_dentry) == d_real_inode(new_dentry))
+ if (source == target)
return 0;
error = may_delete(old_dir, old_dentry, is_dir);