mm: call vfree instead of __vunmap from delayed_vfree_work
authorChristoph Hellwig <hch@lst.de>
Sat, 21 Jan 2023 07:10:46 +0000 (08:10 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 3 Feb 2023 06:33:31 +0000 (22:33 -0800)
This adds an extra, never taken, in_interrupt() branch, but will allow to
cut down the maze of vfree helpers.

Link: https://lkml.kernel.org/r/20230121071051.1143058-6-hch@lst.de
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/vmalloc.c

index 333228c652d15b927d029a26eda1031c9e609fac..0c0267b34afac6abe37f31fb4e5af2dfdcfd04db 100644 (file)
@@ -2707,7 +2707,7 @@ static void delayed_vfree_work(struct work_struct *w)
        struct llist_node *t, *llnode;
 
        llist_for_each_safe(llnode, t, llist_del_all(&p->list))
-               __vunmap((void *)llnode, 1);
+               vfree(llnode);
 }
 
 /**