2023-07-01 04:25:15

by zhangpeng (AS)

[permalink] [raw]
Subject: [PATCH v2 0/2] mm: remove page_rmapping()

From: ZhangPeng <[email protected]>

This minor patch series convert fault_dirty_shared_page() to use a folio
first, then remove the now-unused page_rmapping().

Change log:

v2:
- reverse the order of the two patches
- add RBs from Sidhartha Kumar
- update comment

ZhangPeng (2):
mm: use a folio in fault_dirty_shared_page()
mm: remove page_rmapping()

include/linux/mm.h | 1 -
mm/memory.c | 16 ++++++++--------
mm/util.c | 6 ------
3 files changed, 8 insertions(+), 15 deletions(-)

--
2.25.1



2023-07-01 05:05:12

by zhangpeng (AS)

[permalink] [raw]
Subject: [PATCH v2 2/2] mm: remove page_rmapping()

From: ZhangPeng <[email protected]>

After converting the last user to folio_raw_mapping(), we can safely
remove the function.

Signed-off-by: ZhangPeng <[email protected]>
Reviewed-by: Sidhartha Kumar <[email protected]>
---
include/linux/mm.h | 1 -
mm/util.c | 6 ------
2 files changed, 7 deletions(-)

diff --git a/include/linux/mm.h b/include/linux/mm.h
index 39aa409e84d5..c849419c6b51 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -2151,7 +2151,6 @@ static inline void *folio_address(const struct folio *folio)
return page_address(&folio->page);
}

-extern void *page_rmapping(struct page *page);
extern pgoff_t __page_file_index(struct page *page);

/*
diff --git a/mm/util.c b/mm/util.c
index dd12b9531ac4..5e9305189c3f 100644
--- a/mm/util.c
+++ b/mm/util.c
@@ -734,12 +734,6 @@ void *vcalloc(size_t n, size_t size)
}
EXPORT_SYMBOL(vcalloc);

-/* Neutral page->mapping pointer to address_space or anon_vma or other */
-void *page_rmapping(struct page *page)
-{
- return folio_raw_mapping(page_folio(page));
-}
-
struct anon_vma *folio_anon_vma(struct folio *folio)
{
unsigned long mapping = (unsigned long)folio->mapping;
--
2.25.1


2023-07-02 00:51:31

by Matthew Wilcox

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] mm: remove page_rmapping()

On Sat, Jul 01, 2023 at 11:28:53AM +0800, Peng Zhang wrote:
> From: ZhangPeng <[email protected]>
>
> After converting the last user to folio_raw_mapping(), we can safely
> remove the function.
>
> Signed-off-by: ZhangPeng <[email protected]>
> Reviewed-by: Sidhartha Kumar <[email protected]>

Thank you!

Reviewed-by: Matthew Wilcox (Oracle) <[email protected]>