* [PATCH] mm/mempolicy: remove unused mm argument in lookup_node()
@ 2026-11-27 10:35 Hongfu Li
2026-11-27 18:47 ` SJ Park
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Hongfu Li @ 2026-11-27 10:35 UTC (permalink / raw)
To: David Hildenbrand, Gregory Price, Zi Yan, Joshua Hahn, Rakie Kim,
Ying Huang, Andrew Morton
Cc: hongfu.li, linux-mm, Hongfu Li
From: Hongfu Li <lihongfu@kylinos.cn>
The mm argument of lookup_node() has been unused since commit
f728b9c48d56 ("mm: change lookup_node() to use get_user_pages_fast()"),
which replaced get_user_pages_locked() with get_user_pages_fast() and
dropped the mmap_read_unlock(mm) that was the only user of the argument.
Drop the parameter and update the call site in do_get_mempolicy().
No functional change.
Signed-off-by: Hongfu Li <lihongfu@kylinos.cn>
---
mm/mempolicy.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index 6528c86042bb..502621e82af7 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -1156,7 +1156,7 @@ static void get_policy_nodemask(struct mempolicy *pol, nodemask_t *nodes)
}
}
-static int lookup_node(struct mm_struct *mm, unsigned long addr)
+static int lookup_node(unsigned long addr)
{
struct page *p = NULL;
int ret;
@@ -1223,7 +1223,7 @@ static long do_get_mempolicy(int *policy, nodemask_t *nmask,
vma = NULL;
mpol_get(pol);
mmap_read_unlock(mm);
- err = lookup_node(mm, addr);
+ err = lookup_node(addr);
if (err < 0)
goto out;
*policy = err;
---
base-commit: 3d27e49eb905a5119e78fbe3d3890f376d15c728
change-id: 20261127-for-mempolicy-arg-15d6c5b44cdd
Best regards,
--
Hongfu Li <lihongfu@kylinos.cn>
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] mm/mempolicy: remove unused mm argument in lookup_node()
2026-11-27 10:35 [PATCH] mm/mempolicy: remove unused mm argument in lookup_node() Hongfu Li
@ 2026-11-27 18:47 ` SJ Park
2026-11-29 10:26 ` David Hildenbrand (Arm)
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: SJ Park @ 2026-11-27 18:47 UTC (permalink / raw)
To: Hongfu Li
Cc: SJ Park, David Hildenbrand, Gregory Price, Zi Yan, Joshua Hahn,
Rakie Kim, Ying Huang, Andrew Morton, linux-mm, Hongfu Li
On Fri, 27 Nov 2026 18:35:46 +0800 Hongfu Li <hongfu.li@linux.dev> wrote:
> From: Hongfu Li <lihongfu@kylinos.cn>
>
> The mm argument of lookup_node() has been unused since commit
> f728b9c48d56 ("mm: change lookup_node() to use get_user_pages_fast()"),
> which replaced get_user_pages_locked() with get_user_pages_fast() and
> dropped the mmap_read_unlock(mm) that was the only user of the argument.
>
> Drop the parameter and update the call site in do_get_mempolicy().
> No functional change.
Looks good to me.
>
> Signed-off-by: Hongfu Li <lihongfu@kylinos.cn>
Reviewed-by: SJ Park <sj@kernel.org>
Thanks,
SJ
[...]
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] mm/mempolicy: remove unused mm argument in lookup_node()
2026-11-27 10:35 [PATCH] mm/mempolicy: remove unused mm argument in lookup_node() Hongfu Li
2026-11-27 18:47 ` SJ Park
@ 2026-11-29 10:26 ` David Hildenbrand (Arm)
2026-11-30 1:12 ` Zi Yan
2026-11-30 11:10 ` David Hildenbrand
3 siblings, 0 replies; 5+ messages in thread
From: David Hildenbrand (Arm) @ 2026-11-29 10:26 UTC (permalink / raw)
To: Hongfu Li, Gregory Price, Zi Yan, Joshua Hahn, Rakie Kim,
Ying Huang, Andrew Morton
Cc: linux-mm, Hongfu Li
On 11/27/26 11:35, Hongfu Li wrote:
> From: Hongfu Li <lihongfu@kylinos.cn>
>
> The mm argument of lookup_node() has been unused since commit
> f728b9c48d56 ("mm: change lookup_node() to use get_user_pages_fast()"),
> which replaced get_user_pages_locked() with get_user_pages_fast() and
> dropped the mmap_read_unlock(mm) that was the only user of the argument.
>
> Drop the parameter and update the call site in do_get_mempolicy().
> No functional change.
>
> Signed-off-by: Hongfu Li <lihongfu@kylinos.cn>
> ---
Reviewed-by: David Hildenbrand (Arm) <david@kernel.org>
Thanks, I'll pick this soon.
--
Cheers,
David
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] mm/mempolicy: remove unused mm argument in lookup_node()
2026-11-27 10:35 [PATCH] mm/mempolicy: remove unused mm argument in lookup_node() Hongfu Li
2026-11-27 18:47 ` SJ Park
2026-11-29 10:26 ` David Hildenbrand (Arm)
@ 2026-11-30 1:12 ` Zi Yan
2026-11-30 11:10 ` David Hildenbrand
3 siblings, 0 replies; 5+ messages in thread
From: Zi Yan @ 2026-11-30 1:12 UTC (permalink / raw)
To: Hongfu Li, David Hildenbrand, Gregory Price, Joshua Hahn,
Rakie Kim, Ying Huang, Andrew Morton
Cc: linux-mm, Hongfu Li
On Fri Nov 27, 2026 at 5:35 AM EST, Hongfu Li wrote:
> From: Hongfu Li <lihongfu@kylinos.cn>
>
> The mm argument of lookup_node() has been unused since commit
> f728b9c48d56 ("mm: change lookup_node() to use get_user_pages_fast()"),
> which replaced get_user_pages_locked() with get_user_pages_fast() and
> dropped the mmap_read_unlock(mm) that was the only user of the argument.
>
> Drop the parameter and update the call site in do_get_mempolicy().
> No functional change.
>
> Signed-off-by: Hongfu Li <lihongfu@kylinos.cn>
> ---
> mm/mempolicy.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
LGTM.
Reviewed-by: Zi Yan <ziy@nvidia.com>
--
Best Regards,
Yan, Zi
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] mm/mempolicy: remove unused mm argument in lookup_node()
2026-11-27 10:35 [PATCH] mm/mempolicy: remove unused mm argument in lookup_node() Hongfu Li
` (2 preceding siblings ...)
2026-11-30 1:12 ` Zi Yan
@ 2026-11-30 11:10 ` David Hildenbrand
3 siblings, 0 replies; 5+ messages in thread
From: David Hildenbrand @ 2026-11-30 11:10 UTC (permalink / raw)
To: David Hildenbrand, Gregory Price, Zi Yan, Joshua Hahn, Rakie Kim,
Ying Huang, Andrew Morton, Hongfu Li
Cc: linux-mm, Hongfu Li
On Fri, 27 Nov 2026 18:35:46 +0800, Hongfu Li wrote:
> The mm argument of lookup_node() has been unused since commit
> f728b9c48d56 ("mm: change lookup_node() to use get_user_pages_fast()"),
> which replaced get_user_pages_locked() with get_user_pages_fast() and
> dropped the mmap_read_unlock(mm) that was the only user of the argument.
>
> Drop the parameter and update the call site in do_get_mempolicy().
> No functional change.
>
> [...]
Applied, thanks!
tree: mm/core.git
branch: mempolicy-7.5.misc
Applied patches will appear soon in mm-next, followed by linux-next.
Please report any outstanding bugs that were missed during review, so we
can either drop the patch series or decide how to fix it up.
It is encouraged to provide Acked-bys, Reviewed-bys, and Tested-bys even
though the patches have already been applied. If possible, patch trailers
will be updated.
Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. Further, this is not a guarantee that the
patches will go upstream. If in doubt, please check the listed branch.
[1/1] mm/mempolicy: remove unused mm argument in lookup_node()
https://git.kernel.org/mm/core/c/cbb20d18
--
Cheers,
David
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-11-30 11:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-27 10:35 [PATCH] mm/mempolicy: remove unused mm argument in lookup_node() Hongfu Li
2026-11-27 18:47 ` SJ Park
2026-11-29 10:26 ` David Hildenbrand (Arm)
2026-11-30 1:12 ` Zi Yan
2026-11-30 11:10 ` David Hildenbrand
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.