Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 110048
b: refs/heads/master
c: d0185c0
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Sep 29, 2008
1 parent af0dff1 commit 646f299
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 94715da3633d8abd63376b47c7120df59a69055e
refs/heads/master: d0185c0882d76b8126d4a099c7ac82b3b216d103
10 changes: 6 additions & 4 deletions trunk/fs/dcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -1395,6 +1395,10 @@ struct dentry * __d_lookup(struct dentry * parent, struct qstr * name)
if (dentry->d_parent != parent)
goto next;

/* non-existing due to RCU? */
if (d_unhashed(dentry))
goto next;

/*
* It is safe to compare names since d_move() cannot
* change the qstr (protected by d_lock).
Expand All @@ -1410,10 +1414,8 @@ struct dentry * __d_lookup(struct dentry * parent, struct qstr * name)
goto next;
}

if (!d_unhashed(dentry)) {
atomic_inc(&dentry->d_count);
found = dentry;
}
atomic_inc(&dentry->d_count);
found = dentry;
spin_unlock(&dentry->d_lock);
break;
next:
Expand Down

0 comments on commit 646f299

Please sign in to comment.