diff --git a/[refs] b/[refs] index 94a4d20a274d..abad63fa54c3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 312d3ca856d369bb04d0443846b85b4cdde6fa8a +refs/heads/master: 265ac90230257e9c035e4b0c63a0c11c5336e93c diff --git a/trunk/fs/dcache.c b/trunk/fs/dcache.c index c37a656802b0..1a976d4efbe1 100644 --- a/trunk/fs/dcache.c +++ b/trunk/fs/dcache.c @@ -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;