include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[pandora-kernel.git] / drivers / infiniband / hw / ipath / ipath_user_pages.c
index 82878e3..5e86d73 100644 (file)
@@ -33,6 +33,7 @@
 
 #include <linux/mm.h>
 #include <linux/device.h>
+#include <linux/slab.h>
 #include <linux/sched.h>
 
 #include "ipath_kernel.h"
@@ -59,8 +60,7 @@ static int __get_user_pages(unsigned long start_page, size_t num_pages,
        size_t got;
        int ret;
 
-       lock_limit = current->signal->rlim[RLIMIT_MEMLOCK].rlim_cur >>
-               PAGE_SHIFT;
+       lock_limit = rlimit(RLIMIT_MEMLOCK) >> PAGE_SHIFT;
 
        if (num_pages > lock_limit) {
                ret = -ENOMEM;