summaryrefslogtreecommitdiff
path: root/mm/util.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2021-04-30 08:55:35 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2021-04-30 21:20:37 +0300
commit842ca547f706b1e05ccf3026a0ab15d24772a188 (patch)
tree89b3f84e1e4a3b6285028dae48cef5eac7dc6f61 /mm/util.c
parent1c824a680b1b67ad43c0908f11a70bcf37af56d5 (diff)
downloadlinux-842ca547f706b1e05ccf3026a0ab15d24772a188.tar.xz
mm: move page_mapping_file to pagemap.h
page_mapping_file() is only used by some architectures, and then it is usually only used in one place. Make it a static inline function so other architectures don't have to carry this dead code. Link: https://lkml.kernel.org/r/20210317123011.350118-1-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: David Hildenbrand <david@redhat.com> Acked-by: Mike Rapoport <rppt@linux.ibm.com> Cc: Huang Ying <ying.huang@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/util.c')
-rw-r--r--mm/util.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/mm/util.c b/mm/util.c
index c37e24d5fa43..083c5c417cfc 100644
--- a/mm/util.c
+++ b/mm/util.c
@@ -711,16 +711,6 @@ struct address_space *page_mapping(struct page *page)
}
EXPORT_SYMBOL(page_mapping);
-/*
- * For file cache pages, return the address_space, otherwise return NULL
- */
-struct address_space *page_mapping_file(struct page *page)
-{
- if (unlikely(PageSwapCache(page)))
- return NULL;
- return page_mapping(page);
-}
-
/* Slow path of page_mapcount() for compound pages */
int __page_mapcount(struct page *page)
{