mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-02 20:29:20 +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
|
@ -224,6 +224,9 @@ static int bfs_rename(struct inode *old_dir, struct dentry *old_dentry,
|
|||
struct bfs_sb_info *info;
|
||||
int error = -ENOENT;
|
||||
|
||||
if (new_dentry->d_inode && S_ISDIR(new_dentry->d_inode->i_mode))
|
||||
dentry_unhash(new_dentry);
|
||||
|
||||
old_bh = new_bh = NULL;
|
||||
old_inode = old_dentry->d_inode;
|
||||
if (S_ISDIR(old_inode->i_mode))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue