Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm/mempolicy: remove unused mm argument in lookup_node()
@ 2026-11-27 10:35 Hongfu Li
  2026-11-27 18:47 ` SJ Park
  0 siblings, 1 reply; 2+ 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] 2+ 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
  0 siblings, 0 replies; 2+ 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] 2+ messages in thread

end of thread, other threads:[~2026-11-27 18:48 UTC | newest]

Thread overview: 2+ 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox