Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 217809
b: refs/heads/master
c: 265ac90
h: refs/heads/master
i:
  217807: fb1b7a3
v: v3
  • Loading branch information
Nick Piggin authored and Al Viro committed Oct 26, 2010
1 parent 96aca96 commit 93f49b6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 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: 312d3ca856d369bb04d0443846b85b4cdde6fa8a
refs/heads/master: 265ac90230257e9c035e4b0c63a0c11c5336e93c
9 changes: 6 additions & 3 deletions trunk/fs/dcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,13 +246,16 @@ void dput(struct dentry *dentry)
if (dentry->d_op->d_delete(dentry))
goto unhash_it;
}

/* Unreachable? Get rid of it */
if (d_unhashed(dentry))
goto kill_it;
if (list_empty(&dentry->d_lru)) {
dentry->d_flags |= DCACHE_REFERENCED;

/* Otherwise leave it cached and ensure it's on the LRU */
dentry->d_flags |= DCACHE_REFERENCED;
if (list_empty(&dentry->d_lru))
dentry_lru_add(dentry);
}

spin_unlock(&dentry->d_lock);
spin_unlock(&dcache_lock);
return;
Expand Down

0 comments on commit 93f49b6

Please sign in to comment.