Message ID | 20240412193510.2356957-5-willy@infradead.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Some cleanups for memory-failure | expand |
On 2024/4/13 3:35, Matthew Wilcox (Oracle) wrote: > 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. > > Suggested-by: Miaohe Lin <linmiaohe@huawei.com> > Reviewed-by: Jane Chu <jane.chu@oracle.com> > Reviewed-by: Oscar Salvador <osalvador@suse.de> > Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Acked-by: Miaohe Lin <linmiaohe@huawei.com> Thanks. . > --- > mm/page_vma_mapped.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/mm/page_vma_mapped.c b/mm/page_vma_mapped.c > index c202eab84936..ae5cc42aa208 100644 > --- a/mm/page_vma_mapped.c > +++ b/mm/page_vma_mapped.c > @@ -314,6 +314,7 @@ bool page_vma_mapped_walk(struct page_vma_mapped_walk *pvmw) > 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 >
diff --git a/mm/page_vma_mapped.c b/mm/page_vma_mapped.c index c202eab84936..ae5cc42aa208 100644 --- a/mm/page_vma_mapped.c +++ b/mm/page_vma_mapped.c @@ -314,6 +314,7 @@ bool page_vma_mapped_walk(struct page_vma_mapped_walk *pvmw) 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