All of 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
                   ` (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

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.