]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/madvise: use vma_lookup() instead of find_vma()
authorZhangPeng <zhangpeng362@huawei.com>
Tue, 4 Apr 2023 09:45:15 +0000 (17:45 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 5 Apr 2023 23:02:54 +0000 (16:02 -0700)
commite9eb1db34cc5b8a7dd3acfff55ecdadb06e54195
treef2d151047b59c2dc6cfd7297c1c9f715028ce920
parent2283ae9990444a48355589a4b61a460cfbd2f5b9
mm/madvise: use vma_lookup() instead of find_vma()

Using vma_lookup() verifies the address is contained in the found vma.
This results in easier to read the code.

Link: https://lkml.kernel.org/r/20230404094515.1883552-1-zhangpeng362@huawei.com
Signed-off-by: ZhangPeng <zhangpeng362@huawei.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/madvise.c