]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen: use vma_lookup() in privcmd_ioctl_mmap()
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Tue, 21 Jun 2022 20:46:57 +0000 (20:46 +0000)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Wed, 20 Jul 2022 00:02:48 +0000 (20:02 -0400)
commitc158b8e43bb8480c74ffbff06912b89aca13b259
tree44fde98bc5c7b786de638853d50445667013f7e2
parent8c1e7c64720c645198d4aed657f465eea7f6c7d0
xen: use vma_lookup() in privcmd_ioctl_mmap()

vma_lookup() walks the VMA tree for a specific value, find_vma() will
search the tree after walking to a specific value.  It is more efficient
to only walk to the requested value since privcmd_ioctl_mmap() will exit
the loop if vm_start != msg->va.

Link: https://lkml.kernel.org/r/20220504011345.662299-4-Liam.Howlett@oracle.com
Link: https://lkml.kernel.org/r/20220621204632.3370049-20-Liam.Howlett@oracle.com
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: David Howells <dhowells@redhat.com>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: SeongJae Park <sj@kernel.org>
Cc: Will Deacon <will@kernel.org>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/xen/privcmd.c