From: Lennart Poettering Date: Wed, 11 Jan 2012 02:55:24 +0000 (+0100) Subject: journal: don't realign window twice X-Git-Tag: v38~2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1921a5cb3d3124d62ac397592d9f1f302ca90be5;p=systemd journal: don't realign window twice --- diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c index 7ce63375..419e15e4 100644 --- a/src/journal/journal-file.c +++ b/src/journal/journal-file.c @@ -330,7 +330,7 @@ static int journal_file_move_to(JournalFile *f, int wt, uint64_t offset, uint64_ * the window space before and half behind the * requested mapping */ - delta = PAGE_ALIGN((DEFAULT_WINDOW_SIZE - size) / 2); + delta = (DEFAULT_WINDOW_SIZE - size) / 2; if (delta > offset) delta = offset; @@ -341,7 +341,7 @@ static int journal_file_move_to(JournalFile *f, int wt, uint64_t offset, uint64_ delta = 0; if (offset + size > (uint64_t) f->last_stat.st_size) - size = PAGE_ALIGN((uint64_t) f->last_stat.st_size - offset); + size = (uint64_t) f->last_stat.st_size - offset; if (size <= 0) return -EADDRNOTAVAIL;