From: Nicholas Piggin <npiggin@gmail.com>
Date: Fri, 30 Apr 2021 05:58:55 +0000 (-0700)
Subject: kernel/dma: remove unnecessary unmap_kernel_range
X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=e82b9b3086b93857b1b46341714751b123a4d08b;p=linux.git

kernel/dma: remove unnecessary unmap_kernel_range

vunmap will remove ptes.

Link: https://lkml.kernel.org/r/20210322021806.892164-3-npiggin@gmail.com
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Cédric Le Goater <clg@kaod.org>
Cc: Uladzislau Rezki <urezki@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---

diff --git a/kernel/dma/remap.c b/kernel/dma/remap.c
index 905c3fa005f10..b4526668072e7 100644
--- a/kernel/dma/remap.c
+++ b/kernel/dma/remap.c
@@ -66,6 +66,5 @@ void dma_common_free_remap(void *cpu_addr, size_t size)
 		return;
 	}
 
-	unmap_kernel_range((unsigned long)cpu_addr, PAGE_ALIGN(size));
 	vunmap(cpu_addr);
 }