[PATCH 6/8] mm: remove find_lock_page()

From: Tal Zussman

Date: Mon Nov 02 2026 - 18:05:45 EST


There are no callers left. Remove it. The name still appears in a
sample function graph trace in Documentation/trace/ftrace.rst, which
is recorded output and is left as it is.

Signed-off-by: Tal Zussman <tz2294@xxxxxxxxxxxx>
---
include/linux/pagemap.h | 19 -------------------
1 file changed, 19 deletions(-)

diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index 00e32f96b459..a92329805acd 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -846,25 +846,6 @@ static inline struct page *find_get_page(struct address_space *mapping,
return pagecache_get_page(mapping, offset, 0, 0);
}

-/**
- * find_lock_page - locate, pin and lock a pagecache page
- * @mapping: the address_space to search
- * @index: the page index
- *
- * Looks up the page cache entry at @mapping & @index. If there is a
- * page cache page, it is returned locked and with an increased
- * refcount.
- *
- * Context: May sleep.
- * Return: A struct page or %NULL if there is no page in the cache for this
- * index.
- */
-static inline struct page *find_lock_page(struct address_space *mapping,
- pgoff_t index)
-{
- return pagecache_get_page(mapping, index, FGP_LOCK, 0);
-}
-
/**
* find_or_create_page - locate or add a pagecache page
* @mapping: the page's address_space

--
2.39.5