* [PATCH] mm: remove unused anon_vma_trylock_write()
@ 2026-08-27 7:18 Hao Li
2026-08-27 7:28 ` Lorenzo Stoakes (ARM)
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Hao Li @ 2026-08-27 7:18 UTC (permalink / raw)
To: akpm, david
Cc: ljs, liam, vbabka, rppt, surenb, mhocko, linux-mm, linux-kernel,
Hao Li
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@linux.dev>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mm: remove unused anon_vma_trylock_write()
2026-08-27 7:18 [PATCH] mm: remove unused anon_vma_trylock_write() Hao Li
@ 2026-08-27 7:28 ` Lorenzo Stoakes (ARM)
2026-08-27 12:58 ` David Hildenbrand (Arm)
2026-08-28 2:04 ` SJ Park
2 siblings, 0 replies; 4+ messages in thread
From: Lorenzo Stoakes (ARM) @ 2026-08-27 7:28 UTC (permalink / raw)
To: Hao Li
Cc: akpm, david, liam, vbabka, rppt, surenb, mhocko, linux-mm,
linux-kernel
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@linux.dev>
LGTM so:
Reviewed-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
> ---
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mm: remove unused anon_vma_trylock_write()
2026-08-27 7:18 [PATCH] mm: remove unused anon_vma_trylock_write() Hao Li
2026-08-27 7:28 ` Lorenzo Stoakes (ARM)
@ 2026-08-27 12:58 ` David Hildenbrand (Arm)
2026-08-28 2:04 ` SJ Park
2 siblings, 0 replies; 4+ messages in thread
From: David Hildenbrand (Arm) @ 2026-08-27 12:58 UTC (permalink / raw)
To: Hao Li, akpm
Cc: ljs, liam, vbabka, rppt, surenb, mhocko, linux-mm, linux-kernel
On 8/27/26 09:18, 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@linux.dev>
> ---
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
--
Cheers,
David
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mm: remove unused anon_vma_trylock_write()
2026-08-27 7:18 [PATCH] mm: remove unused anon_vma_trylock_write() Hao Li
2026-08-27 7:28 ` Lorenzo Stoakes (ARM)
2026-08-27 12:58 ` David Hildenbrand (Arm)
@ 2026-08-28 2:04 ` SJ Park
2 siblings, 0 replies; 4+ messages in thread
From: SJ Park @ 2026-08-28 2:04 UTC (permalink / raw)
To: Hao Li
Cc: SJ Park, akpm, david, ljs, liam, vbabka, rppt, surenb, mhocko,
linux-mm, linux-kernel
On Thu, 27 Aug 2026 15:18:06 +0800 Hao Li <hao.li@linux.dev> wrote:
> The last user of anon_vma_trylock_write() was removed by cc22b9978509,
> leaving the helper unused. Remove it.
Nice catch.
>
> Signed-off-by: Hao Li <hao.li@linux.dev>
Reviewed-by: SJ Park <sj@kernel.org>
Thanks,
SJ
[...]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-08-28 2:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-27 7:18 [PATCH] mm: remove unused anon_vma_trylock_write() Hao Li
2026-08-27 7:28 ` Lorenzo Stoakes (ARM)
2026-08-27 12:58 ` David Hildenbrand (Arm)
2026-08-28 2:04 ` SJ Park
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox