LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] mm/swap: Remove the unused get_kernel_page()
@ 2021-08-03 15:07 Baolin Wang
  2021-08-03 15:30 ` Matthew Wilcox
  0 siblings, 1 reply; 3+ messages in thread
From: Baolin Wang @ 2021-08-03 15:07 UTC (permalink / raw)
  To: akpm; +Cc: baolin.wang, linux-mm, linux-kernel

Now there are no users of the get_kernel_page() function,
thus remove it.

Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
---
 include/linux/mm.h |  1 -
 mm/swap.c          | 22 ----------------------
 2 files changed, 23 deletions(-)

diff --git a/include/linux/mm.h b/include/linux/mm.h
index 7bc883c..dbfee57 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1953,7 +1953,6 @@ int __account_locked_vm(struct mm_struct *mm, unsigned long pages, bool inc,
 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);
diff --git a/mm/swap.c b/mm/swap.c
index 6f382ab..645b733 100644
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -180,28 +180,6 @@ int get_kernel_pages(const struct kvec *kiov, int nr_segs, int write,
 }
 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))
 {
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mm/swap: Remove the unused get_kernel_page()
  2021-08-03 15:07 [PATCH] mm/swap: Remove the unused get_kernel_page() Baolin Wang
@ 2021-08-03 15:30 ` Matthew Wilcox
  2021-08-03 15:40   ` Baolin Wang
  0 siblings, 1 reply; 3+ messages in thread
From: Matthew Wilcox @ 2021-08-03 15:30 UTC (permalink / raw)
  To: Baolin Wang; +Cc: akpm, linux-mm, linux-kernel

On Tue, Aug 03, 2021 at 11:07:04PM +0800, Baolin Wang wrote:
> Now there are no users of the get_kernel_page() function,
> thus remove it.
> 
> Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>

Perhaps you should just send a Reviewed-by: for John Hubbard's patch
on July 29th instead?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mm/swap: Remove the unused get_kernel_page()
  2021-08-03 15:30 ` Matthew Wilcox
@ 2021-08-03 15:40   ` Baolin Wang
  0 siblings, 0 replies; 3+ messages in thread
From: Baolin Wang @ 2021-08-03 15:40 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: akpm, linux-mm, linux-kernel



> On Tue, Aug 03, 2021 at 11:07:04PM +0800, Baolin Wang wrote:
>> Now there are no users of the get_kernel_page() function,
>> thus remove it.
>>
>> Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
> 
> Perhaps you should just send a Reviewed-by: for John Hubbard's patch
> on July 29th instead?

Ah, I missed that patch before. Please ignore this patch, sorry for noise.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-03 15:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-03 15:07 [PATCH] mm/swap: Remove the unused get_kernel_page() Baolin Wang
2021-08-03 15:30 ` Matthew Wilcox
2021-08-03 15:40   ` Baolin Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).