]> err.no Git - systemd/commitdiff
journal: when increasing window, make sure to use the increased window
authorLennart Poettering <lennart@poettering.net>
Wed, 4 Jan 2012 01:21:04 +0000 (02:21 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 4 Jan 2012 01:21:04 +0000 (02:21 +0100)
src/journal/journal-file.c

index 977cfa1010f8a57ae057a4b3412e65c907368d0a..95a5aafc9e30aed5197c1f8d864be1563b79799b 100644 (file)
@@ -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;