From: Lennart Poettering Date: Wed, 4 Jan 2012 01:21:04 +0000 (+0100) Subject: journal: when increasing window, make sure to use the increased window X-Git-Tag: v38~83 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a99c349d0d54ca4946c6f81670ab9890f2b4f497;p=systemd journal: when increasing window, make sure to use the increased window --- diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c index 977cfa10..95a5aafc 100644 --- a/src/journal/journal-file.c +++ b/src/journal/journal-file.c @@ -332,11 +332,11 @@ static int journal_file_move_to(JournalFile *f, int wt, uint64_t offset, uint64_ delta = PAGE_ALIGN((DEFAULT_WINDOW_SIZE - size) / 2); - if (offset < delta) + if (delta > offset) delta = offset; offset -= delta; - size += (DEFAULT_WINDOW_SIZE - delta); + size = DEFAULT_WINDOW_SIZE; } else delta = 0;