summaryrefslogtreecommitdiff
path: root/src/readahead-collect.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/readahead-collect.c')
-rw-r--r--src/readahead-collect.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/readahead-collect.c b/src/readahead-collect.c
index ca8227135e..693729598e 100644
--- a/src/readahead-collect.c
+++ b/src/readahead-collect.c
@@ -119,9 +119,10 @@ static int pack_file(FILE *pack, const char *fn, bool on_btrfs) {
goto finish;
}
- pages = l / PAGE_SIZE;
+ pages = l / page_size();
vec = alloca(pages);
+ memset(vec, 0, pages);
if (mincore(start, l, vec) < 0) {
log_warning("mincore(%s) failed: %m", fn);
r = -errno;