summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-01-11 03:55:24 +0100
committerLennart Poettering <lennart@poettering.net>2012-01-11 03:55:24 +0100
commit1921a5cb3d3124d62ac397592d9f1f302ca90be5 (patch)
tree6d41620e28acbea15ad6f3a98117a5d037ca668a /src
parent19a2bd80c18d2845f0e37699c8d8df8c8cb4ed78 (diff)
journal: don't realign window twice
Diffstat (limited to 'src')
-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 7ce6337578..419e15e46f 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;