summaryrefslogtreecommitdiff
path: root/fs/dcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/dcache.c')
-rw-r--r--fs/dcache.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index b527db8e5901..80992e49561c 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -739,14 +739,10 @@ slow_positive:
spin_lock(&dentry->d_lock);
parent = lock_parent(dentry);
got_locks:
- if (unlikely(dentry->d_lockref.count != 1)) {
- dentry->d_lockref.count--;
- } else if (likely(!retain_dentry(dentry))) {
- dentry->d_lockref.count--;
+ dentry->d_lockref.count--;
+ if (likely(dentry->d_lockref.count == 0)) {
__dentry_kill(dentry);
return parent;
- } else {
- dentry->d_lockref.count--;
}
/* we are keeping it, after all */
if (inode)