aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ceph/dir.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c
index 377b96404235..1a867a3601ae 100644
--- a/fs/ceph/dir.c
+++ b/fs/ceph/dir.c
@@ -827,9 +827,6 @@ static int ceph_unlink(struct inode *dir, struct dentry *dentry)
827 int err = -EROFS; 827 int err = -EROFS;
828 int op; 828 int op;
829 829
830 if ((dentry->d_inode->i_mode & S_IFMT) == S_IFDIR)
831 dentry_unhash(dentry);
832
833 if (ceph_snap(dir) == CEPH_SNAPDIR) { 830 if (ceph_snap(dir) == CEPH_SNAPDIR) {
834 /* rmdir .snap/foo is RMSNAP */ 831 /* rmdir .snap/foo is RMSNAP */
835 dout("rmsnap dir %p '%.*s' dn %p\n", dir, dentry->d_name.len, 832 dout("rmsnap dir %p '%.*s' dn %p\n", dir, dentry->d_name.len,
@@ -869,9 +866,6 @@ static int ceph_rename(struct inode *old_dir, struct dentry *old_dentry,
869 struct ceph_mds_request *req; 866 struct ceph_mds_request *req;
870 int err; 867 int err;
871 868
872 if (new_dentry->d_inode && S_ISDIR(new_dentry->d_inode->i_mode))
873 dentry_unhash(new_dentry);
874
875 if (ceph_snap(old_dir) != ceph_snap(new_dir)) 869 if (ceph_snap(old_dir) != ceph_snap(new_dir))
876 return -EXDEV; 870 return -EXDEV;
877 if (ceph_snap(old_dir) != CEPH_NOSNAP || 871 if (ceph_snap(old_dir) != CEPH_NOSNAP ||