* + mm-remove-free_unmap_vmap_area_addr.patch added to -mm tree
@ 2016-11-22 6:10 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2016-11-22 6:10 UTC (permalink / raw)
To: hch, aryabinin, chris, hpa, joaodias, joelaf, jszhang, mingo,
tglx, mm-commits
The patch titled
Subject: mm: remove free_unmap_vmap_area_addr()
has been added to the -mm tree. Its filename is
mm-remove-free_unmap_vmap_area_addr.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mm-remove-free_unmap_vmap_area_addr.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/mm-remove-free_unmap_vmap_area_addr.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Christoph Hellwig <hch@lst.de>
Subject: mm: remove free_unmap_vmap_area_addr()
Just inline it into the only caller.
Link: http://lkml.kernel.org/r/1479474236-4139-3-git-send-email-hch@lst.de
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Jisheng Zhang <jszhang@marvell.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Joel Fernandes <joelaf@google.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: John Dias <joaodias@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/vmalloc.c | 21 ++++++++-------------
1 file changed, 8 insertions(+), 13 deletions(-)
diff -puN mm/vmalloc.c~mm-remove-free_unmap_vmap_area_addr mm/vmalloc.c
--- a/mm/vmalloc.c~mm-remove-free_unmap_vmap_area_addr
+++ a/mm/vmalloc.c
@@ -731,16 +731,6 @@ static struct vmap_area *find_vmap_area(
return va;
}
-static void free_unmap_vmap_area_addr(unsigned long addr)
-{
- struct vmap_area *va;
-
- va = find_vmap_area(addr);
- BUG_ON(!va);
- free_unmap_vmap_area(va);
-}
-
-
/*** Per cpu kva allocator ***/
/*
@@ -1098,6 +1088,7 @@ void vm_unmap_ram(const void *mem, unsig
{
unsigned long size = (unsigned long)count << PAGE_SHIFT;
unsigned long addr = (unsigned long)mem;
+ struct vmap_area *va;
BUG_ON(!addr);
BUG_ON(addr < VMALLOC_START);
@@ -1107,10 +1098,14 @@ void vm_unmap_ram(const void *mem, unsig
debug_check_no_locks_freed(mem, size);
vmap_debug_free_range(addr, addr+size);
- if (likely(count <= VMAP_MAX_ALLOC))
+ if (likely(count <= VMAP_MAX_ALLOC)) {
vb_free(mem, size);
- else
- free_unmap_vmap_area_addr(addr);
+ return;
+ }
+
+ va = find_vmap_area(addr);
+ BUG_ON(!va);
+ free_unmap_vmap_area(va);
}
EXPORT_SYMBOL(vm_unmap_ram);
_
Patches currently in -mm which might be from hch@lst.de are
mm-remove-free_unmap_vmap_area_noflush.patch
mm-remove-free_unmap_vmap_area_addr.patch
mm-refactor-__purge_vmap_area_lazy.patch
mm-warn-about-vfree-from-atomic-context.patch
mm-mark-all-calls-into-the-vmalloc-subsystem-as-potentially-sleeping.patch
mm-turn-vmap_purge_lock-into-a-mutex.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-11-22 6:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-22 6:10 + mm-remove-free_unmap_vmap_area_addr.patch added to -mm tree akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).