All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kernel/kcov: Replace vm_insert_page with vmf_insert_page
@ 2018-09-20 19:12 Souptick Joarder
  2018-09-21  9:37 ` Andrey Ryabinin
  2018-09-22 14:22 ` Matthew Wilcox
  0 siblings, 2 replies; 9+ messages in thread
From: Souptick Joarder @ 2018-09-20 19:12 UTC (permalink / raw)
  To: willy, akpm, mark.rutland, aryabinin, dvyukov, tglx, gregkh, tchibo
  Cc: linux-kernel

There is a plan to replace vm_insert_page with new API
vmf_insert_page. As part of it, converting vm_insert_page
to use vmf_insert_page.

Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
---
 kernel/kcov.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/kernel/kcov.c b/kernel/kcov.c
index 3ebd09e..8900d8e 100644
--- a/kernel/kcov.c
+++ b/kernel/kcov.c
@@ -293,8 +293,9 @@ static int kcov_mmap(struct file *filep, struct vm_area_struct *vma)
 		spin_unlock(&kcov->lock);
 		for (off = 0; off < size; off += PAGE_SIZE) {
 			page = vmalloc_to_page(kcov->area + off);
-			if (vm_insert_page(vma, vma->vm_start + off, page))
-				WARN_ONCE(1, "vm_insert_page() failed");
+			if (vmf_insert_page(vma, vma->vm_start + off, page)
+					!= VM_FAULT_NOPAGE)
+				WARN_ONCE(1, "vmf_insert_page() failed");
 		}
 		return 0;
 	}
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-09-24  7:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-20 19:12 [PATCH] kernel/kcov: Replace vm_insert_page with vmf_insert_page Souptick Joarder
2018-09-21  9:37 ` Andrey Ryabinin
2018-09-21 10:03   ` Souptick Joarder
2018-09-21 11:53     ` Andrey Ryabinin
2018-09-21 13:25       ` Souptick Joarder
2018-09-21 14:45         ` Andrey Ryabinin
2018-09-21 16:20           ` Souptick Joarder
2018-09-22 14:22 ` Matthew Wilcox
2018-09-24  7:53   ` Souptick Joarder

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.