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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c
index d902948a90d8..3ecf915a4550 100644
--- a/fs/ceph/dir.c
+++ b/fs/ceph/dir.c
@@ -150,7 +150,9 @@ more:
150 di = ceph_dentry(dentry); 150 di = ceph_dentry(dentry);
151 } 151 }
152 152
153 atomic_inc(&dentry->d_count); 153 spin_lock(&dentry->d_lock);
154 dentry->d_count++;
155 spin_unlock(&dentry->d_lock);
154 spin_unlock(&dcache_lock); 156 spin_unlock(&dcache_lock);
155 157
156 dout(" %llu (%llu) dentry %p %.*s %p\n", di->offset, filp->f_pos, 158 dout(" %llu (%llu) dentry %p %.*s %p\n", di->offset, filp->f_pos,