diff options
Diffstat (limited to 'fs/ceph/dir.c')
-rw-r--r-- | fs/ceph/dir.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index d2e549023ded..377b96404235 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c | |||
@@ -869,6 +869,9 @@ static int ceph_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
869 | struct ceph_mds_request *req; | 869 | struct ceph_mds_request *req; |
870 | int err; | 870 | int err; |
871 | 871 | ||
872 | if (new_dentry->d_inode && S_ISDIR(new_dentry->d_inode->i_mode)) | ||
873 | dentry_unhash(new_dentry); | ||
874 | |||
872 | if (ceph_snap(old_dir) != ceph_snap(new_dir)) | 875 | if (ceph_snap(old_dir) != ceph_snap(new_dir)) |
873 | return -EXDEV; | 876 | return -EXDEV; |
874 | if (ceph_snap(old_dir) != CEPH_NOSNAP || | 877 | if (ceph_snap(old_dir) != CEPH_NOSNAP || |