Skip to content

Commit 1854bc6

Browse files
William KucharskiMatthew Wilcox (Oracle)
authored andcommitted
mm/readahead: Align file mappings for non-DAX
When we have the opportunity to use PMDs to map a file, we want to follow the same rules as DAX. Signed-off-by: William Kucharski <[email protected]> Signed-off-by: Matthew Wilcox (Oracle) <[email protected]>
1 parent 793917d commit 1854bc6

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

mm/huge_memory.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -582,13 +582,10 @@ unsigned long thp_get_unmapped_area(struct file *filp, unsigned long addr,
582582
unsigned long ret;
583583
loff_t off = (loff_t)pgoff << PAGE_SHIFT;
584584

585-
if (!IS_DAX(filp->f_mapping->host) || !IS_ENABLED(CONFIG_FS_DAX_PMD))
586-
goto out;
587-
588585
ret = __thp_get_unmapped_area(filp, addr, len, off, flags, PMD_SIZE);
589586
if (ret)
590587
return ret;
591-
out:
588+
592589
return current->mm->get_unmapped_area(filp, addr, len, pgoff, flags);
593590
}
594591
EXPORT_SYMBOL_GPL(thp_get_unmapped_area);

0 commit comments

Comments
 (0)