3 #include <linux/module.h>
4 #include <linux/sched.h>
5 #include <linux/slab.h>
27 while (got < num_pages) {
29 (
unsigned long)data + ((
unsigned long)got *
PAGE_SIZE),
30 num_pages - got, write_page, 0, pages + got,
NULL);
78 pages =
kmalloc(
sizeof(*pages) * num_pages, flags);
82 pages[
i] = __page_cache_alloc(flags);
83 if (pages[i] ==
NULL) {
96 const char __user *
data,
97 loff_t off,
size_t len)
123 loff_t off,
size_t len)
147 loff_t off,
size_t len)
174 loff_t off,
size_t len)
209 dout(
"zero_page_vector_page %u~%u\n", off, len);
214 dout(
"zeroing %d %p head from %d\n", i, pages[i],
216 zero_user_segment(pages[i], off, end);
221 dout(
"zeroing %d %p len=%d\n", i, pages[i], len);
228 dout(
"zeroing %d %p tail to %d\n", i, pages[i], (
int)len);
229 zero_user_segment(pages[i], 0, len);