Builds against 4.9

The function signature for get_user_pages() has changed in linux 4.9.
This commit is contained in:
Johanna A 2016-10-29 10:01:01 +02:00
parent fbcad1cb17
commit e01745f66f

View File

@ -75,7 +75,10 @@ static long u2mfn_ioctl(struct file *f, unsigned int cmd,
switch (cmd) { switch (cmd) {
case U2MFN_GET_MFN_FOR_PAGE: case U2MFN_GET_MFN_FOR_PAGE:
down_read(&current->mm->mmap_sem); down_read(&current->mm->mmap_sem);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0) #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
ret = get_user_pages
(data, 1, (FOLL_WRITE | FOLL_FORCE), &user_page, 0);
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
ret = get_user_pages ret = get_user_pages
(data, 1, 1, 0, &user_page, 0); (data, 1, 1, 0, &user_page, 0);
#else #else