1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-25 23:21:33 +03:00

journal: when increasing window, make sure to use the increased window

This commit is contained in:
Lennart Poettering 2012-01-04 02:21:04 +01:00
parent 4bbdcdb301
commit a99c349d0d

View 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;