diff options
Diffstat (limited to 'include/asm-powerpc/hugetlb.h')
-rw-r--r-- | include/asm-powerpc/hugetlb.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/asm-powerpc/hugetlb.h b/include/asm-powerpc/hugetlb.h index ca37c4af27b1..26f0d0ab27a5 100644 --- a/include/asm-powerpc/hugetlb.h +++ b/include/asm-powerpc/hugetlb.h | |||
@@ -24,9 +24,10 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, | |||
24 | static inline int prepare_hugepage_range(struct file *file, | 24 | static inline int prepare_hugepage_range(struct file *file, |
25 | unsigned long addr, unsigned long len) | 25 | unsigned long addr, unsigned long len) |
26 | { | 26 | { |
27 | if (len & ~HPAGE_MASK) | 27 | struct hstate *h = hstate_file(file); |
28 | if (len & ~huge_page_mask(h)) | ||
28 | return -EINVAL; | 29 | return -EINVAL; |
29 | if (addr & ~HPAGE_MASK) | 30 | if (addr & ~huge_page_mask(h)) |
30 | return -EINVAL; | 31 | return -EINVAL; |
31 | return 0; | 32 | return 0; |
32 | } | 33 | } |