mm/mmap: use find_vma_intersection() in do_mmap() for overlap
authorLiam Howlett <liam.howlett@oracle.com>
Tue, 29 Jun 2021 02:38:44 +0000 (19:38 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 29 Jun 2021 17:53:51 +0000 (10:53 -0700)
commit35e43c5ff4d2da700e8ed2216acae81f62800eaa
treefbbee22661dbbc52ecdc5ba84cf508f8130a6377
parent96d990239e31d9623fdb96e829237b997c9d3d63
mm/mmap: use find_vma_intersection() in do_mmap() for overlap

Using find_vma_intersection() avoids the need for a temporary variable and
makes the code cleaner.

Link: https://lkml.kernel.org/r/20210511014328.2902782-1-Liam.Howlett@Oracle.com
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/mmap.c