mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Avi Weiss <thnkslprpt@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: David Hildenbrand <david@kernel.org>,
	Lorenzo Stoakes <ljs@kernel.org>,
	"Liam R. Howlett" <liam@infradead.org>,
	Vlastimil Babka <vbabka@kernel.org>,
	Mike Rapoport <rppt@kernel.org>,
	Suren Baghdasaryan <surenb@google.com>,
	Michal Hocko <mhocko@suse.com>,
	Soheil Hassas Yeganeh <soheil@google.com>,
	Arjun Roy <arjunroy@google.com>,
	Eric Dumazet <edumazet@google.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Avi Weiss <thnkslprpt@gmail.com>
Subject: [PATCH v2 1/3] mm/memory.c: rename walk_to_pmd() to populate_to_pmd()
Date: Wed,  5 Aug 2026 17:42:17 +0300	[thread overview]
Message-ID: <1d3d22df3b43080855d4728095f9ebaddfd7bf88.1785847364.git.thnkslprpt@gmail.com> (raw)
In-Reply-To: <cover.1785847364.git.thnkslprpt@gmail.com>

This helper allocates any missing page-table levels (it doesn't just
'walk'. Rename for clarity.

Signed-off-by: Avi Weiss <thnkslprpt@gmail.com>
---
 mm/memory.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/mm/memory.c b/mm/memory.c
index ff338c2abe92..8658feba8be9 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2268,7 +2268,7 @@ void zap_special_vma_range(struct vm_area_struct *vma, unsigned long address,
 }
 EXPORT_SYMBOL_GPL(zap_special_vma_range);
 
-static pmd_t *walk_to_pmd(struct mm_struct *mm, unsigned long addr)
+static pmd_t *populate_to_pmd(struct mm_struct *mm, unsigned long addr)
 {
 	pgd_t *pgd;
 	p4d_t *p4d;
@@ -2293,7 +2293,7 @@ static pmd_t *walk_to_pmd(struct mm_struct *mm, unsigned long addr)
 pte_t *get_locked_pte(struct mm_struct *mm, unsigned long addr,
 		      spinlock_t **ptl)
 {
-	pmd_t *pmd = walk_to_pmd(mm, addr);
+	pmd_t *pmd = populate_to_pmd(mm, addr);
 
 	if (!pmd)
 		return NULL;
@@ -2437,7 +2437,7 @@ static int insert_pages(struct vm_area_struct *vma, unsigned long addr,
 	int ret;
 more:
 	ret = -EFAULT;
-	pmd = walk_to_pmd(mm, addr);
+	pmd = populate_to_pmd(mm, addr);
 	if (!pmd)
 		goto out;
 
-- 
2.43.0


  reply	other threads:[~2026-08-05 14:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-05 14:42 [PATCH v2 0/3] mm: improve insert_pages() error handling Avi Weiss
2026-08-05 14:42 ` Avi Weiss [this message]
2026-08-25 10:39   ` [PATCH v2 1/3] mm/memory.c: rename walk_to_pmd() to populate_to_pmd() David Hildenbrand (Arm)
2026-08-05 14:42 ` [PATCH v2 2/3] mm/memory.c: simplify error handling in insert_pages() Avi Weiss
2026-08-25 10:38   ` David Hildenbrand (Arm)
2026-08-05 14:42 ` [PATCH v2 3/3] mm: return -ENOMEM for page-table allocation failure " Avi Weiss
2026-08-25 10:40   ` David Hildenbrand (Arm)
2026-08-25 12:52     ` Lorenzo Stoakes (ARM)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1d3d22df3b43080855d4728095f9ebaddfd7bf88.1785847364.git.thnkslprpt@gmail.com \
    --to=thnkslprpt@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=arjunroy@google.com \
    --cc=david@kernel.org \
    --cc=edumazet@google.com \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=mhocko@suse.com \
    --cc=rppt@kernel.org \
    --cc=soheil@google.com \
    --cc=surenb@google.com \
    --cc=vbabka@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®