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

From: Lorenzo Stoakes (ARM)

Date: Tue Nov 03 2026 - 04:04:28 EST


On Mon, Nov 02, 2026 at 05:54:11PM -0500, Tal Zussman wrote:
> 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.

Yeah that's fair enough :)

>
> Signed-off-by: Tal Zussman <tz2294@xxxxxxxxxxxx>

LGTM!

Reviewed-by: Lorenzo Stoakes (ARM) <ljs@xxxxxxxxxx>

> ---
> 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
>

--
Cheers, Lorenzo