RDMA/qib: Use GUP longterm for PSM page pining
authorIra Weiny <ira.weiny@intel.com>
Wed, 23 Jan 2019 19:02:24 +0000 (14:02 -0500)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 24 Jan 2019 16:22:30 +0000 (09:22 -0700)
Similar to the core change commit 5f1d43de5416 ("IB/core: disable memory
registration of filesystem-dax vmas")

PSM should be prevented from using filesystem DAX pages.

Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/qib/qib_user_pages.c

index 16543d5..075f09f 100644 (file)
@@ -67,10 +67,10 @@ static int __qib_get_user_pages(unsigned long start_page, size_t num_pages,
        }
 
        for (got = 0; got < num_pages; got += ret) {
-               ret = get_user_pages(start_page + got * PAGE_SIZE,
-                                    num_pages - got,
-                                    FOLL_WRITE | FOLL_FORCE,
-                                    p + got, NULL);
+               ret = get_user_pages_longterm(start_page + got * PAGE_SIZE,
+                                             num_pages - got,
+                                             FOLL_WRITE | FOLL_FORCE,
+                                             p + got, NULL);
                if (ret < 0)
                        goto bail_release;
        }