From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
Jason Gunthorpe <jgg@nvidia.com>,
Alexander Gordeev <agordeev@linux.ibm.com>,
Al Viro <viro@zeniv.linux.org.uk>,
Andreas Larsson <andreas@gaisler.com>,
Andrey Konovalov <andreyknvl@gmail.com>,
Arnd Bergmann <arnd@arndb.de>,
Baolin Wang <baolin.wang@linux.alibaba.com>,
Baoquan He <bhe@redhat.com>,
"Chatre, Reinette" <reinette.chatre@intel.com>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Christian Brauner <brauner@kernel.org>,
Dan Williams <dan.j.williams@intel.com>,
Dave Jiang <dave.jiang@intel.com>,
Dave Martin <dave.martin@arm.com>, Dave Young <dyoung@redhat.com>,
David Hildenbrand <david@redhat.com>,
"David S. Miller" <davem@davemloft.net>,
Dmitriy Vyukov <dvyukov@google.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Guo Ren <guoren@kernel.org>, Heiko Carstens <hca@linux.ibm.com>,
Hugh Dickins <hughd@google.com>,
James Morse <james.morse@arm.com>, Jan Kara <jack@suse.cz>,
Jann Horn <jannh@google.com>, Jonathan Corbet <corbet@lwn.net>,
Kevin Tian <kevin.tian@intel.com>,
Konstantin Komarov <almaz.alexandrovich@paragon-software.com>,
Liam Howlett <liam.howlett@oracle.com>,
"Luck, Tony" <tony.luck@intel.com>,
"Matthew Wilcox (Oracle)" <willy@infradead.org>,
Michal Hocko <mhocko@suse.com>, Mike Rapoport <rppt@kernel.org>,
Muchun Song <muchun.song@linux.dev>,
Nicolas Pitre <nico@fluxnic.net>,
Oscar Salvador <osalvador@suse.de>,
Pedro Falcato <pfalcato@suse.de>,
Robin Murohy <robin.murphy@arm.com>,
Sumanth Korikkar <sumanthk@linux.ibm.com>,
Suren Baghdasaryan <surenb@google.com>,
Sven Schnelle <svens@linux.ibm.com>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
"Uladzislau Rezki (Sony)" <urezki@gmail.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Vishal Verma <vishal.l.verma@intel.com>,
Vivek Goyal <vgoyal@redhat.com>, Vlastimil Babka <vbabka@suse.cz>,
Will Deacon <will@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Sasha Levin <sashal@kernel.org>
Subject: [PATCH 6.18.y 1/5] mm/vma: remove unused function, make internal functions static
Date: Sun, 4 Oct 2026 06:17:51 -0400 [thread overview]
Message-ID: <20261004101719.1402752-1-sashal@kernel.org> (raw)
In-Reply-To: <2026100329-jaws-trash-1c19@gregkh>
From: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
[ Upstream commit cf1d98f44d056d7114554beb78665c20d1ed244a ]
unlink_file_vma() is not used by anything, so remove it.
vma_link() and vma_link_file() are only used within mm/vma.c, so make them
static.
Link: https://lkml.kernel.org/r/f2ab9ea051225a02e6d1d45a7608f4e149220117.1760959442.git.lorenzo.stoakes@oracle.com
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Andreas Larsson <andreas@gaisler.com>
Cc: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Baoquan He <bhe@redhat.com>
Cc: Chatre, Reinette <reinette.chatre@intel.com>
Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Dave Jiang <dave.jiang@intel.com>
Cc: Dave Martin <dave.martin@arm.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Dmitriy Vyukov <dvyukov@google.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Guo Ren <guoren@kernel.org>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: James Morse <james.morse@arm.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Jann Horn <jannh@google.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Kevin Tian <kevin.tian@intel.com>
Cc: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Nicolas Pitre <nico@fluxnic.net>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Pedro Falcato <pfalcato@suse.de>
Cc: Robin Murohy <robin.murphy@arm.com>
Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Sven Schnelle <svens@linux.ibm.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: "Uladzislau Rezki (Sony)" <urezki@gmail.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Vishal Verma <vishal.l.verma@intel.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Stable-dep-of: 976d5e0ddac8 ("mm/vma: predicate setting mmap_prepare VMA fields on new vma alloc")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
mm/vma.c | 21 ++-------------------
mm/vma.h | 6 ------
2 files changed, 2 insertions(+), 25 deletions(-)
diff --git a/mm/vma.c b/mm/vma.c
index 5beb18b0610b0..74657c264c1ae 100644
--- a/mm/vma.c
+++ b/mm/vma.c
@@ -1800,24 +1800,7 @@ void unlink_file_vma_batch_final(struct unlink_vma_file_batch *vb)
unlink_file_vma_batch_process(vb);
}
-/*
- * Unlink a file-based vm structure from its interval tree, to hide
- * vma from rmap and vmtruncate before freeing its page tables.
- */
-void unlink_file_vma(struct vm_area_struct *vma)
-{
- struct file *file = vma->vm_file;
-
- if (file) {
- struct address_space *mapping = file->f_mapping;
-
- i_mmap_lock_write(mapping);
- __remove_shared_vm_struct(vma, mapping);
- i_mmap_unlock_write(mapping);
- }
-}
-
-void vma_link_file(struct vm_area_struct *vma)
+static void vma_link_file(struct vm_area_struct *vma)
{
struct file *file = vma->vm_file;
struct address_space *mapping;
@@ -1830,7 +1813,7 @@ void vma_link_file(struct vm_area_struct *vma)
}
}
-int vma_link(struct mm_struct *mm, struct vm_area_struct *vma)
+static int vma_link(struct mm_struct *mm, struct vm_area_struct *vma)
{
VMA_ITERATOR(vmi, mm, 0);
diff --git a/mm/vma.h b/mm/vma.h
index 4c7ea8b893ab7..9d5ee6ac913ad 100644
--- a/mm/vma.h
+++ b/mm/vma.h
@@ -381,12 +381,6 @@ void unlink_file_vma_batch_final(struct unlink_vma_file_batch *vb);
void unlink_file_vma_batch_add(struct unlink_vma_file_batch *vb,
struct vm_area_struct *vma);
-void unlink_file_vma(struct vm_area_struct *vma);
-
-void vma_link_file(struct vm_area_struct *vma);
-
-int vma_link(struct mm_struct *mm, struct vm_area_struct *vma);
-
struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
unsigned long addr, unsigned long len, pgoff_t pgoff,
bool *need_rmap_locks);
--
2.53.0
next prev parent reply other threads:[~2026-10-04 10:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-03 13:22 FAILED: patch "[PATCH] mm/vma: predicate setting mmap_prepare VMA fields on new vma" failed to apply to 6.18-stable tree gregkh
2026-10-04 10:17 ` Sasha Levin [this message]
2026-10-04 10:17 ` [PATCH 6.18.y 2/5] mm/vma: rename __mmap_prepare() function to avoid confusion Sasha Levin
2026-10-04 10:17 ` [PATCH 6.18.y 3/5] mm: add remap_pfn_range_prepare(), remap_pfn_range_complete() Sasha Levin
2026-10-04 10:17 ` [PATCH 6.18.y 4/5] mm: abstract io_remap_pfn_range() based on PFN Sasha Levin
2026-10-04 10:17 ` [PATCH 6.18.y 5/5] mm/vma: predicate setting mmap_prepare VMA fields on new vma alloc Sasha Levin
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=20261004101719.1402752-1-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=agordeev@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=almaz.alexandrovich@paragon-software.com \
--cc=andreas@gaisler.com \
--cc=andreyknvl@gmail.com \
--cc=arnd@arndb.de \
--cc=baolin.wang@linux.alibaba.com \
--cc=bhe@redhat.com \
--cc=borntraeger@linux.ibm.com \
--cc=brauner@kernel.org \
--cc=corbet@lwn.net \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=dave.martin@arm.com \
--cc=davem@davemloft.net \
--cc=david@redhat.com \
--cc=dvyukov@google.com \
--cc=dyoung@redhat.com \
--cc=gor@linux.ibm.com \
--cc=gregkh@linuxfoundation.org \
--cc=guoren@kernel.org \
--cc=hca@linux.ibm.com \
--cc=hughd@google.com \
--cc=jack@suse.cz \
--cc=james.morse@arm.com \
--cc=jannh@google.com \
--cc=jgg@nvidia.com \
--cc=kevin.tian@intel.com \
--cc=liam.howlett@oracle.com \
--cc=lorenzo.stoakes@oracle.com \
--cc=mhocko@suse.com \
--cc=muchun.song@linux.dev \
--cc=nico@fluxnic.net \
--cc=osalvador@suse.de \
--cc=pfalcato@suse.de \
--cc=reinette.chatre@intel.com \
--cc=robin.murphy@arm.com \
--cc=rppt@kernel.org \
--cc=stable@vger.kernel.org \
--cc=sumanthk@linux.ibm.com \
--cc=surenb@google.com \
--cc=svens@linux.ibm.com \
--cc=tony.luck@intel.com \
--cc=tsbogend@alpha.franken.de \
--cc=urezki@gmail.com \
--cc=vbabka@suse.cz \
--cc=vgoyal@redhat.com \
--cc=viro@zeniv.linux.org.uk \
--cc=vishal.l.verma@intel.com \
--cc=will@kernel.org \
--cc=willy@infradead.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 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.