Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7231bbf0 authored by Kalesh Singh's avatar Kalesh Singh
Browse files

ANDROID: 16K: madvise_vma_pad_pages: Remove filemap_fault check



Some file systems like F2FS use a custom filemap_fault ops. Remove this
check, as checking vm_file is sufficient.

Bug: 330117029
Bug: 327600007
Bug: 330767927
Bug: 328266487
Bug: 329803029
Change-Id: Id6a584d934f06650c0a95afd1823669fc77ba2c2
Signed-off-by: default avatarKalesh Singh <kaleshsingh@google.com>
parent 95ac7272
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -196,7 +196,7 @@ static inline bool linker_ctx(void)
 *    2) The range ends at the end address of the VMA
 *    3) The range starts at an address greater than the start address of the VMA
 *    4) The number of the pages in the range does not exceed VM_TOTAL_PAD_PAGES.
 *    5) The VMA is a regular file backed VMA (filemap_fault)
 *    5) The VMA is a file backed VMA.
 *    6) The file backing the VMA is a shared library (*.so)
 *    7) The madvise was requested by bionic's dynamic linker.
 */
@@ -221,7 +221,7 @@ void madvise_vma_pad_pages(struct vm_area_struct *vma,
		return;

	/* Only handle this for file backed VMAs */
	if (!vma->vm_file || !vma->vm_ops || vma->vm_ops->fault != filemap_fault)
	if (!vma->vm_file)
		return;

	/* Limit this to only shared libraries (*.so) */