X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=fs%2Fdcache.c;h=48b44a714b3558c5f73099315094799b680b82ff;hb=3e8d6ad9bf1f02fdb9fd119c3c266d4b73b7175d;hp=313b54b2b8f2cb0f074fd122f7b929f67b60cee8;hpb=454e2398be9b9fa30433fccc548db34d19aa9958;p=linux-2.6 diff --git a/fs/dcache.c b/fs/dcache.c index 313b54b2b8..48b44a714b 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -406,7 +406,7 @@ static void prune_dcache(int count, struct super_block *sb) cond_resched_lock(&dcache_lock); tmp = dentry_unused.prev; - if (unlikely(sb)) { + if (sb) { /* Try to find a dentry for this sb, but don't try * too hard, if they aren't near the tail they will * be moved down again soon @@ -522,8 +522,7 @@ void shrink_dcache_sb(struct super_block * sb) dentry = list_entry(tmp, struct dentry, d_lru); if (dentry->d_sb != sb) continue; - list_del(tmp); - list_add(tmp, &dentry_unused); + list_move(tmp, &dentry_unused); } /* @@ -638,7 +637,7 @@ resume: * of the unused list for prune_dcache */ if (!atomic_read(&dentry->d_count)) { - list_add(&dentry->d_lru, dentry_unused.prev); + list_add_tail(&dentry->d_lru, &dentry_unused); dentry_stat.nr_unused++; found++; }