--- a/kernel/os-mlock.c	2015-11-08 21:43:39.000000000 -0800
+++ b/kernel/os-mlock.c	2016-04-18 15:09:59.940350210 -0700
@@ -49,7 +49,7 @@
     }
 
     down_read(&mm->mmap_sem);
-    ret = get_user_pages(current, mm, (unsigned long)address,
+    ret = get_user_pages((unsigned long)address,
             page_count, write, force, user_pages, NULL);
     up_read(&mm->mmap_sem);
     pinned = ret;
@@ -62,7 +62,7 @@
     else if (pinned < page_count)
     {
         for (i = 0; i < pinned; i++)
-            page_cache_release(user_pages[i]);
+            put_page(user_pages[i]);
         os_free_mem(user_pages);
         return RM_ERR_INVALID_ADDRESS;
     }
@@ -114,7 +114,7 @@
                 PAGE_SIZE, PCI_DMA_BIDIRECTIONAL);
         if (write)
             set_page_dirty_lock(user_pages[i]);
-        page_cache_release(user_pages[i]);
+        put_page(user_pages[i]);
     }
 
     os_free_mem(user_pages);

