[systemd-devel] [PATCH 2/2] journal: Set the last_unused pointer correctly when attaching an unused window
Colin Guthrie
colin at mageia.org
Tue Oct 16 04:03:37 PDT 2012
It seems the previous code was copy/pasted from context_detach_window()
but not updated.
---
src/journal/mmap-cache.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/journal/mmap-cache.c b/src/journal/mmap-cache.c
index 7813f03..251aefe 100644
--- a/src/journal/mmap-cache.c
+++ b/src/journal/mmap-cache.c
@@ -205,8 +205,8 @@ static void context_attach_window(Context *c, Window *w) {
if (w->in_unused) {
/* Used again? */
LIST_REMOVE(Window, unused, c->cache->unused, w);
- if (!c->cache->last_unused)
- c->cache->last_unused = w;
+ if (c->cache->last_unused == w)
+ c->cache->last_unused = w->unused_prev;
w->in_unused = false;
}
--
1.7.12.3
More information about the systemd-devel
mailing list