diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/mincore.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mm/mincore.c b/mm/mincore.c index 9780097e3812..9c1d0a426e95 100644 --- a/mm/mincore.c +++ b/mm/mincore.c | |||
@@ -125,6 +125,8 @@ static long do_mincore(unsigned long addr, unsigned char *vec, unsigned long pag | |||
125 | #endif | 125 | #endif |
126 | } | 126 | } |
127 | } | 127 | } |
128 | |||
129 | vec[i] = present; | ||
128 | } | 130 | } |
129 | pte_unmap_unlock(ptep-1, ptl); | 131 | pte_unmap_unlock(ptep-1, ptl); |
130 | 132 | ||
@@ -135,6 +137,9 @@ none_mapped: | |||
135 | pgoff = linear_page_index(vma, addr); | 137 | pgoff = linear_page_index(vma, addr); |
136 | for (i = 0; i < nr; i++, pgoff++) | 138 | for (i = 0; i < nr; i++, pgoff++) |
137 | vec[i] = mincore_page(vma->vm_file->f_mapping, pgoff); | 139 | vec[i] = mincore_page(vma->vm_file->f_mapping, pgoff); |
140 | } else { | ||
141 | for (i = 0; i < nr; i++) | ||
142 | vec[i] = 0; | ||
138 | } | 143 | } |
139 | 144 | ||
140 | return nr; | 145 | return nr; |