Re: [PATCH] mm: remove unused anon_vma_trylock_write()

From: Lorenzo Stoakes (ARM)

Date: Thu Aug 27 2026 - 03:29:14 EST


On Thu, Aug 27, 2026 at 03:18:06PM +0800, Hao Li wrote:
> The last user of anon_vma_trylock_write() was removed by cc22b9978509,
> leaving the helper unused. Remove it.
>
> Signed-off-by: Hao Li <hao.li@xxxxxxxxx>

LGTM so:

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

> ---
> mm/internal.h | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/mm/internal.h b/mm/internal.h
> index 68db5abd0a4c..9069013d191f 100644
> --- a/mm/internal.h
> +++ b/mm/internal.h
> @@ -298,11 +298,6 @@ static inline void anon_vma_lock_write(struct anon_vma *anon_vma)
> down_write(&anon_vma->root->rwsem);
> }
>
> -static inline int anon_vma_trylock_write(struct anon_vma *anon_vma)
> -{
> - return down_write_trylock(&anon_vma->root->rwsem);
> -}
> -
> static inline void anon_vma_unlock_write(struct anon_vma *anon_vma)
> {
> up_write(&anon_vma->root->rwsem);
> --
> 2.54.0
>

--
Cheers, Lorenzo