All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged mm-stable] mm-move-dummy_vm_ops-out-of-a-header.patch removed from -mm tree
@ 2023-08-21 20:40 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2023-08-21 20:40 UTC (permalink / raw)
  To: mm-commits, willy, mjguzik, akpm


The quilt patch titled
     Subject: mm: move dummy_vm_ops out of a header
has been removed from the -mm tree.  Its filename was
     mm-move-dummy_vm_ops-out-of-a-header.patch

This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Mateusz Guzik <mjguzik@gmail.com>
Subject: mm: move dummy_vm_ops out of a header
Date: Mon, 7 Aug 2023 01:16:11 +0200

Otherwise the kernel ends up with multiple copies:
$ nm vmlinux | grep dummy_vm_ops
ffffffff81e4ea00 d dummy_vm_ops.2
ffffffff81e11760 d dummy_vm_ops.254
ffffffff81e406e0 d dummy_vm_ops.4
ffffffff81e3c780 d dummy_vm_ops.7

While here prefix it with vma_.

Link: https://lkml.kernel.org/r/20230806231611.1395735-1-mjguzik@gmail.com
Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 include/linux/mm.h |    6 +++---
 mm/init-mm.c       |    2 ++
 2 files changed, 5 insertions(+), 3 deletions(-)

--- a/include/linux/mm.h~mm-move-dummy_vm_ops-out-of-a-header
+++ a/include/linux/mm.h
@@ -751,17 +751,17 @@ static inline struct vm_area_struct *loc
 
 #endif /* CONFIG_PER_VMA_LOCK */
 
+extern const struct vm_operations_struct vma_dummy_vm_ops;
+
 /*
  * WARNING: vma_init does not initialize vma->vm_lock.
  * Use vm_area_alloc()/vm_area_free() if vma needs locking.
  */
 static inline void vma_init(struct vm_area_struct *vma, struct mm_struct *mm)
 {
-	static const struct vm_operations_struct dummy_vm_ops = {};
-
 	memset(vma, 0, sizeof(*vma));
 	vma->vm_mm = mm;
-	vma->vm_ops = &dummy_vm_ops;
+	vma->vm_ops = &vma_dummy_vm_ops;
 	INIT_LIST_HEAD(&vma->anon_vma_chain);
 	vma_mark_detached(vma, false);
 	vma_numab_state_init(vma);
--- a/mm/init-mm.c~mm-move-dummy_vm_ops-out-of-a-header
+++ a/mm/init-mm.c
@@ -17,6 +17,8 @@
 #define INIT_MM_CONTEXT(name)
 #endif
 
+const struct vm_operations_struct vma_dummy_vm_ops;
+
 /*
  * For dynamically allocated mm_structs, there is a dynamically sized cpumask
  * at the end of the structure, the size of which depends on the maximum CPU
_

Patches currently in -mm which might be from mjguzik@gmail.com are

kernel-fork-stop-playing-lockless-games-for-exe_file-replacement.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-08-21 20:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-21 20:40 [merged mm-stable] mm-move-dummy_vm_ops-out-of-a-header.patch removed from -mm tree Andrew Morton

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.