All of lore.kernel.org
 help / color / mirror / Atom feed
* + mm-delete-unused-get_kernel_page.patch added to -mm tree
@ 2021-07-29 22:34 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2021-07-29 22:34 UTC (permalink / raw)
  To: mm-commits, Trond.Myklebust, sebastian, riel, neilb, msalter,
	michaelc, mgorman, jmorris, hch, eparis, emunson, dfeng, davem,
	a.p.zijlstra, jhubbard


The patch titled
     Subject: mm: delete unused get_kernel_page()
has been added to the -mm tree.  Its filename is
     mm-delete-unused-get_kernel_page.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/mm-delete-unused-get_kernel_page.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/mm-delete-unused-get_kernel_page.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: John Hubbard <jhubbard@nvidia.com>
Subject: mm: delete unused get_kernel_page()

get_kernel_page() was added in 2012 by [1].  It was used for a while for
NFS, but then in 2014, a refactoring [2] removed all callers, and it has
apparently not been used since.

Remove get_kernel_page() because it has no callers.

[1] commit 18022c5d8627 ("mm: add get_kernel_page[s] for pinning of
    kernel addresses for I/O")
[2] commit 91f79c43d1b5 ("new helper: iov_iter_get_pages_alloc()")

Link: https://lkml.kernel.org/r/20210729221847.1165665-1-jhubbard@nvidia.com
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Rik van Riel <riel@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Eric B Munson <emunson@mgebm.net>
Cc: Eric Paris <eparis@redhat.com>
Cc: James Morris <jmorris@namei.org>
Cc: Mike Christie <michaelc@cs.wisc.edu>
Cc: Neil Brown <neilb@suse.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Xiaotian Feng <dfeng@redhat.com>
Cc: Mark Salter <msalter@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 include/linux/mm.h |    1 -
 mm/swap.c          |   22 ----------------------
 2 files changed, 23 deletions(-)

--- a/include/linux/mm.h~mm-delete-unused-get_kernel_page
+++ a/include/linux/mm.h
@@ -1815,7 +1815,6 @@ int __account_locked_vm(struct mm_struct
 struct kvec;
 int get_kernel_pages(const struct kvec *iov, int nr_pages, int write,
 			struct page **pages);
-int get_kernel_page(unsigned long start, int write, struct page **pages);
 struct page *get_dump_page(unsigned long addr);
 
 extern int try_to_release_page(struct page * page, gfp_t gfp_mask);
--- a/mm/swap.c~mm-delete-unused-get_kernel_page
+++ a/mm/swap.c
@@ -179,28 +179,6 @@ int get_kernel_pages(const struct kvec *
 }
 EXPORT_SYMBOL_GPL(get_kernel_pages);
 
-/*
- * get_kernel_page() - pin a kernel page in memory
- * @start:	starting kernel address
- * @write:	pinning for read/write, currently ignored
- * @pages:	array that receives pointer to the page pinned.
- *		Must be at least nr_segs long.
- *
- * Returns 1 if page is pinned. If the page was not pinned, returns
- * -errno. The page returned must be released with a put_page() call
- * when it is finished with.
- */
-int get_kernel_page(unsigned long start, int write, struct page **pages)
-{
-	const struct kvec kiov = {
-		.iov_base = (void *)start,
-		.iov_len = PAGE_SIZE
-	};
-
-	return get_kernel_pages(&kiov, 1, write, pages);
-}
-EXPORT_SYMBOL_GPL(get_kernel_page);
-
 static void pagevec_lru_move_fn(struct pagevec *pvec,
 	void (*move_fn)(struct page *page, struct lruvec *lruvec))
 {
_

Patches currently in -mm which might be from jhubbard@nvidia.com are

mm-delete-unused-get_kernel_page.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-29 22:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-29 22:34 + mm-delete-unused-get_kernel_page.patch added to -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.