]> 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>
Mon, 22 Aug 2022 15:04:30 +0000 (15:04 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 22 Aug 2022 22:58:22 +0000 (15:58 -0700)
commit653a02b023e225074147b49bb839aae4d31e1d6f
treed69ea76a8e58b566643bc7d0e41e15a52154837b
parent89cb89ec300bfc71aa647c0cb7db89fc079da939
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/20220822150128.1562046-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 Hildenbrand <david@redhat.com>
Cc: David Howells <dhowells@redhat.com>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: SeongJae Park <sj@kernel.org>
Cc: Sven Schnelle <svens@linux.ibm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Yu Zhao <yuzhao@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/xen/privcmd.c