Skip to content

Commit

Permalink
mm/rmap: correct stale comment of rmap_walk_anon and rmap_walk_file
Browse files Browse the repository at this point in the history
1. update page to folio in comment
2. add comment of new added @locked

Link: https://lkml.kernel.org/r/20230718092136.1935789-1-shikemeng@huaweicloud.com
Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
  • Loading branch information
Kemeng Shi authored and Andrew Morton committed Aug 18, 2023
1 parent cabdf74 commit 89be82b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions mm/rmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -2397,11 +2397,12 @@ static struct anon_vma *rmap_walk_anon_lock(struct folio *folio,
/*
* rmap_walk_anon - do something to anonymous page using the object-based
* rmap method
* @page: the page to be handled
* @folio: the folio to be handled
* @rwc: control variable according to each walk type
* @locked: caller holds relevant rmap lock
*
* Find all the mappings of a page using the mapping pointer and the vma chains
* contained in the anon_vma struct it points to.
* Find all the mappings of a folio using the mapping pointer and the vma
* chains contained in the anon_vma struct it points to.
*/
static void rmap_walk_anon(struct folio *folio,
struct rmap_walk_control *rwc, bool locked)
Expand Down Expand Up @@ -2445,10 +2446,11 @@ static void rmap_walk_anon(struct folio *folio,

/*
* rmap_walk_file - do something to file page using the object-based rmap method
* @page: the page to be handled
* @folio: the folio to be handled
* @rwc: control variable according to each walk type
* @locked: caller holds relevant rmap lock
*
* Find all the mappings of a page using the mapping pointer and the vma chains
* Find all the mappings of a folio using the mapping pointer and the vma chains
* contained in the address_space struct it points to.
*/
static void rmap_walk_file(struct folio *folio,
Expand Down

0 comments on commit 89be82b

Please sign in to comment.