aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index c692dad3de18..3a33ae3ace5b 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -6994,6 +6994,9 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry,
6994 u64 root_objectid; 6994 u64 root_objectid;
6995 int ret; 6995 int ret;
6996 6996
6997 if (new_inode && S_ISDIR(new_dentry->d_inode->i_mode))
6998 dentry_unhash(new_dentry);
6999
6997 if (new_dir->i_ino == BTRFS_EMPTY_SUBVOL_DIR_OBJECTID) 7000 if (new_dir->i_ino == BTRFS_EMPTY_SUBVOL_DIR_OBJECTID)
6998 return -EPERM; 7001 return -EPERM;
6999 7002