We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 28acd53 commit 06b5a69Copy full SHA for 06b5a69
mm/filemap.c
@@ -3157,7 +3157,7 @@ static struct file *do_sync_mmap_readahead(struct vm_fault *vmf)
3157
3158
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
3159
/* Use the readahead code, even if readahead is disabled */
3160
- if (vm_flags & VM_HUGEPAGE) {
+ if ((vm_flags & VM_HUGEPAGE) && HPAGE_PMD_ORDER <= MAX_PAGECACHE_ORDER) {
3161
fpin = maybe_unlock_mmap_for_io(vmf, fpin);
3162
ractl._index &= ~((unsigned long)HPAGE_PMD_NR - 1);
3163
ra->size = HPAGE_PMD_NR;
0 commit comments