From 56ab6f077f05e9ce770401699705609adac7e036 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Wed, 1 Oct 2008 17:05:26 +0000 Subject: [PATCH] * I accidently broke get_next_locked_block_cache() in r27074; it would always ignore every other cache (starting from the first). * The consequence of this was that no blocks were written back automatically for those caches, and their transactions were never idle, causing bug #2781. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27831 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/cache/block_cache.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/system/kernel/cache/block_cache.cpp b/src/system/kernel/cache/block_cache.cpp index f7633b8aab..9bb6a7f5f9 100644 --- a/src/system/kernel/cache/block_cache.cpp +++ b/src/system/kernel/cache/block_cache.cpp @@ -1596,17 +1596,10 @@ get_next_locked_block_cache(block_cache *last) } else cache = sCaches.Head(); - while (cache != NULL) { - cache = sCaches.GetNext(cache); - if (cache == NULL) - break; - + if (cache != NULL) { mutex_lock(&cache->lock); - break; - } - - if (cache != NULL) sCaches.Insert(sCaches.GetNext(cache), (block_cache *)&sMarkCache); + } return cache; }