diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/i386/mm/hugetlbpage.c | 2 | ||||
-rw-r--r-- | arch/ia64/mm/hugetlbpage.c | 6 | ||||
-rw-r--r-- | arch/sparc64/mm/hugetlbpage.c | 2 |
3 files changed, 4 insertions, 6 deletions
diff --git a/arch/i386/mm/hugetlbpage.c b/arch/i386/mm/hugetlbpage.c index efdf95ac8031..6c06d9c0488e 100644 --- a/arch/i386/mm/hugetlbpage.c +++ b/arch/i386/mm/hugetlbpage.c | |||
@@ -367,7 +367,7 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr, | |||
367 | return -ENOMEM; | 367 | return -ENOMEM; |
368 | 368 | ||
369 | if (flags & MAP_FIXED) { | 369 | if (flags & MAP_FIXED) { |
370 | if (prepare_hugepage_range(addr, len, pgoff)) | 370 | if (prepare_hugepage_range(addr, len)) |
371 | return -EINVAL; | 371 | return -EINVAL; |
372 | return addr; | 372 | return addr; |
373 | } | 373 | } |
diff --git a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c index d22861c5b04c..a9ff685aea25 100644 --- a/arch/ia64/mm/hugetlbpage.c +++ b/arch/ia64/mm/hugetlbpage.c | |||
@@ -75,10 +75,8 @@ int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep) | |||
75 | * Don't actually need to do any preparation, but need to make sure | 75 | * Don't actually need to do any preparation, but need to make sure |
76 | * the address is in the right region. | 76 | * the address is in the right region. |
77 | */ | 77 | */ |
78 | int prepare_hugepage_range(unsigned long addr, unsigned long len, pgoff_t pgoff) | 78 | int prepare_hugepage_range(unsigned long addr, unsigned long len) |
79 | { | 79 | { |
80 | if (pgoff & (~HPAGE_MASK >> PAGE_SHIFT)) | ||
81 | return -EINVAL; | ||
82 | if (len & ~HPAGE_MASK) | 80 | if (len & ~HPAGE_MASK) |
83 | return -EINVAL; | 81 | return -EINVAL; |
84 | if (addr & ~HPAGE_MASK) | 82 | if (addr & ~HPAGE_MASK) |
@@ -151,7 +149,7 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr, u | |||
151 | 149 | ||
152 | /* Handle MAP_FIXED */ | 150 | /* Handle MAP_FIXED */ |
153 | if (flags & MAP_FIXED) { | 151 | if (flags & MAP_FIXED) { |
154 | if (prepare_hugepage_range(addr, len, pgoff)) | 152 | if (prepare_hugepage_range(addr, len)) |
155 | return -EINVAL; | 153 | return -EINVAL; |
156 | return addr; | 154 | return addr; |
157 | } | 155 | } |
diff --git a/arch/sparc64/mm/hugetlbpage.c b/arch/sparc64/mm/hugetlbpage.c index eaba9b70b184..6cfab2e4d340 100644 --- a/arch/sparc64/mm/hugetlbpage.c +++ b/arch/sparc64/mm/hugetlbpage.c | |||
@@ -175,7 +175,7 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr, | |||
175 | return -ENOMEM; | 175 | return -ENOMEM; |
176 | 176 | ||
177 | if (flags & MAP_FIXED) { | 177 | if (flags & MAP_FIXED) { |
178 | if (prepare_hugepage_range(addr, len, pgoff)) | 178 | if (prepare_hugepage_range(addr, len)) |
179 | return -EINVAL; | 179 | return -EINVAL; |
180 | return addr; | 180 | return addr; |
181 | } | 181 | } |