diff options
author | Greg Kroah-Hartman | 2017-05-22 08:56:55 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2017-05-22 08:56:55 +0200 |
commit | b4a338d2b3cafa1be68d4e1903203c7e08a38ee5 (patch) | |
tree | 069f3753af1cda34c36a7627000ab46ef5c51c83 /arch/sparc/include/asm/hugetlb.h | |
parent | misc: sram-exec: Use aligned fncpy instead of memcpy (diff) | |
parent | Linux 4.12-rc2 (diff) | |
download | kernel-qcow2-linux-b4a338d2b3cafa1be68d4e1903203c7e08a38ee5.tar.gz kernel-qcow2-linux-b4a338d2b3cafa1be68d4e1903203c7e08a38ee5.tar.xz kernel-qcow2-linux-b4a338d2b3cafa1be68d4e1903203c7e08a38ee5.zip |
Merge 4.12-rc2 into char-misc-next
We want the fixes in here as well to handle merge issues.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/sparc/include/asm/hugetlb.h')
-rw-r--r-- | arch/sparc/include/asm/hugetlb.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/sparc/include/asm/hugetlb.h b/arch/sparc/include/asm/hugetlb.h index dcbf985ab243..d1f837dc77a4 100644 --- a/arch/sparc/include/asm/hugetlb.h +++ b/arch/sparc/include/asm/hugetlb.h @@ -24,9 +24,11 @@ static inline int is_hugepage_only_range(struct mm_struct *mm, static inline int prepare_hugepage_range(struct file *file, unsigned long addr, unsigned long len) { - if (len & ~HPAGE_MASK) + struct hstate *h = hstate_file(file); + + if (len & ~huge_page_mask(h)) return -EINVAL; - if (addr & ~HPAGE_MASK) + if (addr & ~huge_page_mask(h)) return -EINVAL; return 0; } |