filemap: Remove thp_contains()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Sun, 28 Nov 2021 21:14:50 +0000 (16:14 -0500)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Tue, 4 Jan 2022 18:15:33 +0000 (13:15 -0500)
This function is now unused, so delete it.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: William Kucharski <william.kucharski@oracle.com>
include/linux/pagemap.h

index 3f26b191ede3fe373d1a195fd59d689be1f75027..8c2cad7f0c36a10a15fbc476c294a6716c5daea0 100644 (file)
@@ -512,15 +512,6 @@ static inline struct page *grab_cache_page_nowait(struct address_space *mapping,
                        mapping_gfp_mask(mapping));
 }
 
-/* Does this page contain this index? */
-static inline bool thp_contains(struct page *head, pgoff_t index)
-{
-       /* HugeTLBfs indexes the page cache in units of hpage_size */
-       if (PageHuge(head))
-               return head->index == index;
-       return page_index(head) == (index & ~(thp_nr_pages(head) - 1UL));
-}
-
 #define swapcache_index(folio) __page_file_index(&(folio)->page)
 
 /**