mm: remove hmm_vma_alloc_locked_page
authorChristoph Hellwig <hch@lst.de>
Wed, 26 Jun 2019 12:27:19 +0000 (14:27 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 2 Jul 2019 17:32:44 +0000 (14:32 -0300)
The only user of it has just been removed, and there wasn't really any need
to wrap a basic memory allocator to start with.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
include/linux/hmm.h
mm/hmm.c

index ba19c19e24eddae3c6a618ed5d66676b1ffd23b5..1d55b7ea2da6a3a17dff898402a4580b084975d4 100644 (file)
@@ -587,9 +587,6 @@ static inline void hmm_mm_init(struct mm_struct *mm) {}
 #if IS_ENABLED(CONFIG_DEVICE_PRIVATE)
 struct hmm_devmem;
 
-struct page *hmm_vma_alloc_locked_page(struct vm_area_struct *vma,
-                                      unsigned long addr);
-
 /*
  * struct hmm_devmem_ops - callback for ZONE_DEVICE memory events
  *
index e4470462298f059870ba781da599bdaf7d03b3c4..fdbd487712922721ef2af5b81581255d21fd3f60 100644 (file)
--- a/mm/hmm.c
+++ b/mm/hmm.c
@@ -1330,20 +1330,6 @@ EXPORT_SYMBOL(hmm_range_dma_unmap);
 
 
 #if IS_ENABLED(CONFIG_DEVICE_PRIVATE)
-struct page *hmm_vma_alloc_locked_page(struct vm_area_struct *vma,
-                                      unsigned long addr)
-{
-       struct page *page;
-
-       page = alloc_page_vma(GFP_HIGHUSER, vma, addr);
-       if (!page)
-               return NULL;
-       lock_page(page);
-       return page;
-}
-EXPORT_SYMBOL(hmm_vma_alloc_locked_page);
-
-
 static void hmm_devmem_ref_release(struct percpu_ref *ref)
 {
        struct hmm_devmem *devmem;