diff options
author | Brian Norris <computersforpeace@gmail.com> | 2017-06-01 13:53:55 -0400 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2017-06-01 13:53:55 -0400 |
commit | 05e97a9eda72d58dba293857df6aac62584ef99a (patch) | |
tree | e86e692f26d4879ff2210c54722e2b7780210249 /arch/sparc/include/asm/hugetlb.h | |
parent | 2ea659a9ef488125eb46da6eb571de5eae5c43f6 (diff) | |
parent | d4ed3b9015b5eebc90d629579d9e7944607cbae5 (diff) |
Merge tag 'nand/fixes-for-4.12-rc3' of git://git.infradead.org/linux-mtd into MTD
From Boris:
"""
This pull request contains several fixes to the core and the tango
driver.
tango fixes:
* Add missing MODULE_DEVICE_TABLE() in tango_nand.c
* Update the number of corrected bitflips
core fixes:
* Fix a long standing memory leak in nand_scan_tail()
* Fix several bugs introduced by the per-vendor init/detection
infrastructure (introduced in 4.12)
* Add a static specifier to nand_ooblayout_lp_hamming_ops definition
"""
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, | |||
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 | |||
29 | if (len & ~huge_page_mask(h)) | ||
28 | return -EINVAL; | 30 | return -EINVAL; |
29 | if (addr & ~HPAGE_MASK) | 31 | if (addr & ~huge_page_mask(h)) |
30 | return -EINVAL; | 32 | return -EINVAL; |
31 | return 0; | 33 | return 0; |
32 | } | 34 | } |