mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 15:27:29 +00:00
vfs: push dentry_unhash on rename_dir into file systems
Only a few file systems need this. Start by pushing it down into each rename method (except gfs2 and xfs) so that it can be dealt with on a per-fs basis. Acked-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Sage Weil <sage@newdream.net> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
79bf7c732b
commit
e4eaac06bc
36 changed files with 110 additions and 12 deletions
|
@ -1227,6 +1227,9 @@ static int reiserfs_rename(struct inode *old_dir, struct dentry *old_dentry,
|
|||
unsigned long savelink = 1;
|
||||
struct timespec ctime;
|
||||
|
||||
if (new_dentry->d_inode && S_ISDIR(new_dentry->d_inode->i_mode))
|
||||
dentry_unhash(new_dentry);
|
||||
|
||||
/* three balancings: (1) old name removal, (2) new name insertion
|
||||
and (3) maybe "save" link insertion
|
||||
stat data updates: (1) old directory,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue