diff options
author | Colin Guthrie <colin@mageia.org> | 2012-10-16 12:03:37 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-10-16 16:14:46 +0200 |
commit | a2ab7ee6122a5006cafc45d7b81f726656fb65cc (patch) | |
tree | 013dbd264e4d3a861e1fc4d1d78fa9e518bbe400 /src/journal | |
parent | 89de694724f376a6852e879fe987e7e531327654 (diff) |
journal: Set the last_unused pointer correctly when attaching an unused window
It seems the previous code was copy/pasted from context_detach_window()
but not updated.
Diffstat (limited to 'src/journal')
-rw-r--r-- | src/journal/mmap-cache.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/journal/mmap-cache.c b/src/journal/mmap-cache.c index 7813f03754..251aefe121 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; } |