* [PATCH] mm: rmap: rename page_not_mapped() to folio_not_mapped()
@ 2022-09-27 6:38 Kefeng Wang
2022-09-28 14:27 ` David Hildenbrand
0 siblings, 1 reply; 2+ messages in thread
From: Kefeng Wang @ 2022-09-27 6:38 UTC (permalink / raw)
To: Andrew Morton, linux-mm; +Cc: Matthew Wilcox, linux-kernel, Kefeng Wang
Since commit 2f031c6f042c ("mm/rmap: Convert rmap_walk() to
take a folio"), page_not_mapped() takes folio as parameter,
rename it to be consistent.
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
mm/rmap.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/mm/rmap.c b/mm/rmap.c
index 2ec925e5fa6a..df228602cf0e 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -1801,7 +1801,7 @@ static bool invalid_migration_vma(struct vm_area_struct *vma, void *arg)
return vma_is_temporary_stack(vma);
}
-static int page_not_mapped(struct folio *folio)
+static int folio_not_mapped(struct folio *folio)
{
return !folio_mapped(folio);
}
@@ -1822,7 +1822,7 @@ void try_to_unmap(struct folio *folio, enum ttu_flags flags)
struct rmap_walk_control rwc = {
.rmap_one = try_to_unmap_one,
.arg = (void *)flags,
- .done = page_not_mapped,
+ .done = folio_not_mapped,
.anon_lock = folio_lock_anon_vma_read,
};
@@ -2150,7 +2150,7 @@ void try_to_migrate(struct folio *folio, enum ttu_flags flags)
struct rmap_walk_control rwc = {
.rmap_one = try_to_migrate_one,
.arg = (void *)flags,
- .done = page_not_mapped,
+ .done = folio_not_mapped,
.anon_lock = folio_lock_anon_vma_read,
};
@@ -2297,7 +2297,7 @@ static bool folio_make_device_exclusive(struct folio *folio,
};
struct rmap_walk_control rwc = {
.rmap_one = page_make_device_exclusive_one,
- .done = page_not_mapped,
+ .done = folio_not_mapped,
.anon_lock = folio_lock_anon_vma_read,
.arg = &args,
};
--
2.35.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mm: rmap: rename page_not_mapped() to folio_not_mapped()
2022-09-27 6:38 [PATCH] mm: rmap: rename page_not_mapped() to folio_not_mapped() Kefeng Wang
@ 2022-09-28 14:27 ` David Hildenbrand
0 siblings, 0 replies; 2+ messages in thread
From: David Hildenbrand @ 2022-09-28 14:27 UTC (permalink / raw)
To: Kefeng Wang, Andrew Morton, linux-mm; +Cc: Matthew Wilcox, linux-kernel
On 27.09.22 08:38, Kefeng Wang wrote:
> Since commit 2f031c6f042c ("mm/rmap: Convert rmap_walk() to
> take a folio"), page_not_mapped() takes folio as parameter,
> rename it to be consistent.
>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> ---
> mm/rmap.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/mm/rmap.c b/mm/rmap.c
> index 2ec925e5fa6a..df228602cf0e 100644
> --- a/mm/rmap.c
> +++ b/mm/rmap.c
> @@ -1801,7 +1801,7 @@ static bool invalid_migration_vma(struct vm_area_struct *vma, void *arg)
> return vma_is_temporary_stack(vma);
> }
>
> -static int page_not_mapped(struct folio *folio)
> +static int folio_not_mapped(struct folio *folio)
> {
> return !folio_mapped(folio);
> }
> @@ -1822,7 +1822,7 @@ void try_to_unmap(struct folio *folio, enum ttu_flags flags)
> struct rmap_walk_control rwc = {
> .rmap_one = try_to_unmap_one,
> .arg = (void *)flags,
> - .done = page_not_mapped,
> + .done = folio_not_mapped,
> .anon_lock = folio_lock_anon_vma_read,
> };
>
> @@ -2150,7 +2150,7 @@ void try_to_migrate(struct folio *folio, enum ttu_flags flags)
> struct rmap_walk_control rwc = {
> .rmap_one = try_to_migrate_one,
> .arg = (void *)flags,
> - .done = page_not_mapped,
> + .done = folio_not_mapped,
> .anon_lock = folio_lock_anon_vma_read,
> };
>
> @@ -2297,7 +2297,7 @@ static bool folio_make_device_exclusive(struct folio *folio,
> };
> struct rmap_walk_control rwc = {
> .rmap_one = page_make_device_exclusive_one,
> - .done = page_not_mapped,
> + .done = folio_not_mapped,
> .anon_lock = folio_lock_anon_vma_read,
> .arg = &args,
> };
I'm wondering if we should call it "folio_unmapped()". Anyhow
Reviewed-by: David Hildenbrand <david@redhat.com>
--
Thanks,
David / dhildenb
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-28 14:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-27 6:38 [PATCH] mm: rmap: rename page_not_mapped() to folio_not_mapped() Kefeng Wang
2022-09-28 14:27 ` David Hildenbrand
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).