VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   33 Branches   55 Tags
author: Liam R. Howlett <Liam.Howlett@Oracle.com> 2021-09-02 14:56:49 -0700 committer: Linus Torvalds <torvalds@linux-foundation.org> 2021-09-03 09:58:14 -0700 commit: 9b593cb20283e68e5e65b09ca10038935297f05b parent: 5b78ed24e8ec48602c1d6f5a188e58d000c81e2b
Commit Summary:
remap_file_pages: Use vma_lookup() instead of find_vma()
Diffstat:
1 file changed, 1 insertion, 4 deletions
diff --git a/mm/mmap.c b/mm/mmap.c
index 79f4f8ae43ec..52fed230dc21 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -2994,14 +2994,11 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
 	if (mmap_write_lock_killable(mm))
 		return -EINTR;
 
-	vma = find_vma(mm, start);
+	vma = vma_lookup(mm, start);
 
 	if (!vma || !(vma->vm_flags & VM_SHARED))
 		goto out;
 
-	if (start < vma->vm_start)
-		goto out;
-
 	if (start + size > vma->vm_end) {
 		struct vm_area_struct *next;