X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fjournal%2Fmmap-cache.c;h=88fe52331c952ba5c0760d1a1306c8219e1b7a63;hb=be3ea5eaf24f4507efe88b450f751da860a9d21c;hp=4be3f7e96608bcb947d27e13e7a7bc6a184d9f2f;hpb=f801968466fed39d50d410b30ac828c26722cc95;p=elogind.git diff --git a/src/journal/mmap-cache.c b/src/journal/mmap-cache.c index 4be3f7e96..88fe52331 100644 --- a/src/journal/mmap-cache.c +++ b/src/journal/mmap-cache.c @@ -181,7 +181,7 @@ static void context_detach_window(Context *c) { c->window = NULL; LIST_REMOVE(Context, by_window, w->contexts, c); - if (!w->contexts) { + if (!w->contexts && !w->keep_always) { /* Not used anymore? */ LIST_PREPEND(Window, unused, c->cache->unused, w); if (!c->cache->last_unused) @@ -200,7 +200,7 @@ static void context_attach_window(Context *c, Window *w) { context_detach_window(c); - if (!w->contexts) { + if (w->in_unused) { /* Used again? */ LIST_REMOVE(Window, unused, c->cache->unused, w); if (!c->cache->last_unused)