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>
Tue, 18 Apr 2023 23:29:52 +0000 (16:29 -0700)
commit92d5df38ca91f138d4964d71a6835add95f99e59
tree5403576ffdab2b81fb5cffa026969abac8ac6b99
parent6b0ba2abbeede5e1756d54277e811cf2783eb0a8
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