aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ceph/dir.c')
-rw-r--r--fs/ceph/dir.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c
index 1a867a3601ae..d2e549023ded 100644
--- a/fs/ceph/dir.c
+++ b/fs/ceph/dir.c
@@ -827,6 +827,9 @@ 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
830 if (ceph_snap(dir) == CEPH_SNAPDIR) { 833 if (ceph_snap(dir) == CEPH_SNAPDIR) {
831 /* rmdir .snap/foo is RMSNAP */ 834 /* rmdir .snap/foo is RMSNAP */
832 dout("rmsnap dir %p '%.*s' dn %p\n", dir, dentry->d_name.len, 835 dout("rmsnap dir %p '%.*s' dn %p\n", dir, dentry->d_name.len,