diff options
author | Matthew Wilcox <willy@infradead.org> | 2023-07-27 21:39:44 +0100 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-08-21 13:37:30 -0700 |
commit | 866ff80176aa1f9c0ba65f2164cf608c5cde4851 (patch) | |
tree | e574ac80ff0b938a30c16576a86bf30ad671a4e5 /mm | |
parent | 108c3dc6cd3dbe36824469b7ea860337978e0439 (diff) |
mm: improve the comment in isolate_migratepages_block()
A recent patch shows that not everybody understands that "stabilise the
mapping" really means "prevent the mapping from being freed", so change
the wording to hopefully make that more clear.
Link: https://lkml.kernel.org/r/ZMLWEB4m3zvX6SBN@casper.infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/compaction.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mm/compaction.c b/mm/compaction.c index e6ac0ef4c178..c4d3a3129fd5 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -1100,13 +1100,13 @@ isolate_migratepages_block(struct compact_control *cc, unsigned long low_pfn, bool migrate_dirty; /* - * Only pages without mappings or that have a - * ->migrate_folio callback are possible to migrate - * without blocking. However, we can be racing with - * truncation so it's necessary to lock the page - * to stabilise the mapping as truncation holds - * the page lock until after the page is removed - * from the page cache. + * Only folios without mappings or that have + * a ->migrate_folio callback are possible to + * migrate without blocking. However, we may + * be racing with truncation, which can free + * the mapping. Truncation holds the folio lock + * until after the folio is removed from the page + * cache so holding it ourselves is sufficient. */ if (!folio_trylock(folio)) goto isolate_fail_put; |