vserver 2.0 rc7
[linux-2.6.git] / net / sunrpc / cache.c
index bf5a2de..900f5bc 100644 (file)
@@ -321,12 +321,10 @@ static int cache_clean(void)
                        if (test_and_clear_bit(CACHE_PENDING, &ch->flags))
                                queue_loose(current_detail, ch);
 
-                       if (!atomic_read(&ch->refcnt))
+                       if (atomic_read(&ch->refcnt) == 1)
                                break;
                }
                if (ch) {
-                       cache_get(ch);
-                       clear_bit(CACHE_HASHED, &ch->flags);
                        *cp = ch->next;
                        ch->next = NULL;
                        current_detail->entries--;