summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-09-21 23:33:22 +0200
committerLennart Poettering <lennart@poettering.net>2012-09-21 23:37:06 +0200
commite18021f7daf6940e5fa87a35e320bb50fbd3e3ef (patch)
tree4be5f22427d53bf1c40c8d465376dd94fd087296 /src/journal
parent848af05524553aa8171de26323707ee06a9bd9d8 (diff)
journal: always keep marked mmap windows around
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/mmap-cache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/journal/mmap-cache.c b/src/journal/mmap-cache.c
index 4be3f7e966..88fe52331c 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)