summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-01-04 02:21:04 +0100
committerLennart Poettering <lennart@poettering.net>2012-01-04 02:21:04 +0100
commita99c349d0d54ca4946c6f81670ab9890f2b4f497 (patch)
tree56d2d194ad45f3afc7538c6d2688ec9b77b697b0
parent4bbdcdb301f8ef6f8b9e943210ab61250003c517 (diff)
journal: when increasing window, make sure to use the increased window
-rw-r--r--src/journal/journal-file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index 977cfa1010..95a5aafc9e 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;