staging: lustre: llite: rw26: Remove unused function definition
authorsayli karnik <karniksayli1995@gmail.com>
Fri, 17 Mar 2017 03:25:51 +0000 (08:55 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Mar 2017 06:19:10 +0000 (15:19 +0900)
The patch removes unused function definition ll_get_user_pages().
The use of ll_get_user_pages() was replaced with iov_iter_get_pages_alloc()
in commit 91f79c43d1b54d7154b118860d81b39bad07dfff.

Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/llite/rw26.c

index d89e79599199db8311e0de7c6231ecc10a00c6a9..420f296f9658d9907d64af0327513069929283ba 100644 (file)
@@ -156,32 +156,6 @@ static int ll_releasepage(struct page *vmpage, gfp_t gfp_mask)
 
 #define MAX_DIRECTIO_SIZE (2 * 1024 * 1024 * 1024UL)
 
-static inline int ll_get_user_pages(int rw, unsigned long user_addr,
-                                   size_t size, struct page ***pages,
-                                   int *max_pages)
-{
-       int result = -ENOMEM;
-
-       /* set an arbitrary limit to prevent arithmetic overflow */
-       if (size > MAX_DIRECTIO_SIZE) {
-               *pages = NULL;
-               return -EFBIG;
-       }
-
-       *max_pages = (user_addr + size + PAGE_SIZE - 1) >> PAGE_SHIFT;
-       *max_pages -= user_addr >> PAGE_SHIFT;
-
-       *pages = libcfs_kvzalloc(*max_pages * sizeof(**pages), GFP_NOFS);
-       if (*pages) {
-               result = get_user_pages_fast(user_addr, *max_pages,
-                                            (rw == READ), *pages);
-               if (unlikely(result <= 0))
-                       kvfree(*pages);
-       }
-
-       return result;
-}
-
 /*  ll_free_user_pages - tear down page struct array
  *  @pages: array of page struct pointers underlying target buffer
  */