mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-11-01 09:13:37 +00:00 
			
		
		
		
	Revert "vfs: rename: check backing inode being equal"
This reverts commit9409e22acd. Since commit51f7e52dc9("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>
This commit is contained in:
		
							parent
							
								
									beef5121f3
								
							
						
					
					
						commit
						8d3e293637
					
				
					 1 changed files with 1 additions and 5 deletions
				
			
		| 
						 | 
					@ -4345,11 +4345,7 @@ int vfs_rename(struct inode *old_dir, struct dentry *old_dentry,
 | 
				
			||||||
	bool new_is_dir = false;
 | 
						bool new_is_dir = false;
 | 
				
			||||||
	unsigned max_links = new_dir->i_sb->s_max_links;
 | 
						unsigned max_links = new_dir->i_sb->s_max_links;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/*
 | 
						if (source == target)
 | 
				
			||||||
	 * Check source == target.
 | 
					 | 
				
			||||||
	 * On overlayfs need to look at underlying inodes.
 | 
					 | 
				
			||||||
	 */
 | 
					 | 
				
			||||||
	if (d_real_inode(old_dentry) == d_real_inode(new_dentry))
 | 
					 | 
				
			||||||
		return 0;
 | 
							return 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	error = may_delete(old_dir, old_dentry, is_dir);
 | 
						error = may_delete(old_dir, old_dentry, is_dir);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue