From: Sang-Heon Jeon <ekffu200098@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@kernel.org>
Cc: Anshuman Khandual <anshuman.khandual@arm.com>,
"Jose A . Perez de Azpillaga" <azpijr@gmail.com>,
"Liam R. Howlett" <liam@infradead.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Lorenzo Stoakes <ljs@kernel.org>, Michal Hocko <mhocko@suse.com>,
Mike Rapoport <rppt@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Vlastimil Babka <vbabka@kernel.org>
Subject: [PATCH v2 1/3] mm/memory: remove unused vmf_insert_mixed_mkwrite()
Date: Sat, 3 Oct 2026 01:05:32 +0900 [thread overview]
Message-ID: <20261002160535.661399-2-ekffu200098@gmail.com> (raw)
In-Reply-To: <20261002160535.661399-1-ekffu200098@gmail.com>
Since commit 38607c62b34b ("fs/dax: properly refcount fs dax pages"),
vmf_insert_mixed_mkwrite() has no callers.
So remove the function and its declaration.
The comment above the function describes the -EBUSY handling in
__vm_insert_mixed(). Move it above that check.
No functional change.
Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
---
include/linux/mm.h | 2 --
mm/memory.c | 16 +++++-----------
2 files changed, 5 insertions(+), 13 deletions(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index c038d06825c3..2ac734efd4ec 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -5008,8 +5008,6 @@ vm_fault_t vmf_insert_pfn_prot(struct vm_area_struct *vma, unsigned long addr,
unsigned long pfn, pgprot_t pgprot);
vm_fault_t vmf_insert_mixed(struct vm_area_struct *vma, unsigned long addr,
unsigned long pfn);
-vm_fault_t vmf_insert_mixed_mkwrite(struct vm_area_struct *vma,
- unsigned long addr, unsigned long pfn);
int vm_iomap_memory(struct vm_area_struct *vma, phys_addr_t start, unsigned long len);
static inline vm_fault_t vmf_insert_page(struct vm_area_struct *vma,
diff --git a/mm/memory.c b/mm/memory.c
index 330cde31bf8b..4b2e4be28031 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -3052,6 +3052,11 @@ static vm_fault_t __vm_insert_mixed(struct vm_area_struct *vma,
if (err == -ENOMEM)
return VM_FAULT_OOM;
+ /*
+ * If the insertion of PTE failed because someone else already added a
+ * different entry in the mean time, we treat that as success as we assume
+ * the same entry was actually inserted.
+ */
if (err < 0 && err != -EBUSY)
return VM_FAULT_SIGBUS;
@@ -3085,17 +3090,6 @@ vm_fault_t vmf_insert_mixed(struct vm_area_struct *vma, unsigned long addr,
}
EXPORT_SYMBOL(vmf_insert_mixed);
-/*
- * If the insertion of PTE failed because someone else already added a
- * different entry in the mean time, we treat that as success as we assume
- * the same entry was actually inserted.
- */
-vm_fault_t vmf_insert_mixed_mkwrite(struct vm_area_struct *vma,
- unsigned long addr, unsigned long pfn)
-{
- return __vm_insert_mixed(vma, addr, pfn, true);
-}
-
/*
* maps a range of physical memory into the requested pages. the old
* mappings are removed. any references to nonexistent pages results
--
2.43.0
next prev parent reply other threads:[~2026-10-02 16:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-02 16:05 [PATCH v2 0/3] " Sang-Heon Jeon
2026-10-02 16:05 ` Sang-Heon Jeon [this message]
2026-10-02 18:35 ` [PATCH v2 1/3] " SJ Park
2026-10-02 23:32 ` Jose A. Perez de Azpillaga
2026-10-02 16:05 ` [PATCH v2 2/3] mm/memory: remove the mkwrite argument from __vm_insert_mixed() Sang-Heon Jeon
2026-10-02 18:45 ` SJ Park
2026-10-02 23:34 ` Jose A. Perez de Azpillaga
2026-10-02 16:05 ` [PATCH v2 3/3] mm/memory: merge __vm_insert_mixed() into vmf_insert_mixed() Sang-Heon Jeon
2026-10-02 18:47 ` SJ Park
2026-10-02 23:35 ` Jose A. Perez de Azpillaga
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=20261002160535.661399-2-ekffu200098@gmail.com \
--to=ekffu200098@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=anshuman.khandual@arm.com \
--cc=azpijr@gmail.com \
--cc=david@kernel.org \
--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=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®