Commit 8d3e2936 authored by Miklos Szeredi's avatar Miklos Szeredi

Revert "vfs: rename: check backing inode being equal"

This reverts commit 9409e22a.

Since commit 51f7e52d ("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: default avatarMiklos Szeredi <mszeredi@redhat.com>
parent beef5121
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment