mm: make page_mapped_in_vma conditional on CONFIG_MEMORY_FAILURE

This function is only currently used by the memory-failure code, so we can
omit it if we're not compiling in the memory-failure code.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Matthew Wilcox (Oracle) <[email protected]>
Suggested-by: Miaohe Lin <[email protected]>
Reviewed-by: Jane Chu <[email protected]>
Reviewed-by: Oscar Salvador <[email protected]>
Acked-by: Miaohe Lin <[email protected]>
Cc: Dan Williams <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
This commit is contained in:
Matthew Wilcox (Oracle) authored and Andrew Morton committed 2024-05-05 17:53:45 -07:00
1 parent 37bc2ff506
commit b87f978dc7
1 file changed
+2
+2
View File
@@ -314,6 +314,7 @@ next_pte:
return false;
}
#ifdef CONFIG_MEMORY_FAILURE
/**
* page_mapped_in_vma - check whether a page is really mapped in a VMA
* @page: the page to test
@@ -344,3 +345,4 @@ unsigned long page_mapped_in_vma(struct page *page, struct vm_area_struct *vma)
out:
return pvmw.address;
}
#endif