diff options
author | William Kucharski <william.kucharski@oracle.com> | 2019-09-22 15:43:15 +0300 |
---|---|---|
committer | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-03-21 20:01:36 +0300 |
commit | 1854bc6e2420472676c5c90d3d6b15f6cd640e40 (patch) | |
tree | b87ed751246f6920dda0921dcf249f9446b0bcfa /mm/huge_memory.c | |
parent | 793917d997df2e432f3e9ac126e4482d68256d01 (diff) | |
download | linux-1854bc6e2420472676c5c90d3d6b15f6cd640e40.tar.xz |
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 <william.kucharski@oracle.com>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Diffstat (limited to 'mm/huge_memory.c')
-rw-r--r-- | mm/huge_memory.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 38e233a7d977..f85b04b31bd1 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -582,13 +582,10 @@ unsigned long thp_get_unmapped_area(struct file *filp, unsigned long addr, unsigned long ret; loff_t off = (loff_t)pgoff << PAGE_SHIFT; - if (!IS_DAX(filp->f_mapping->host) || !IS_ENABLED(CONFIG_FS_DAX_PMD)) - goto out; - ret = __thp_get_unmapped_area(filp, addr, len, off, flags, PMD_SIZE); if (ret) return ret; -out: + return current->mm->get_unmapped_area(filp, addr, len, pgoff, flags); } EXPORT_SYMBOL_GPL(thp_get_unmapped_area); |