Commit 866ff801 authored by Matthew Wilcox's avatar Matthew Wilcox Committed by Andrew Morton

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.orgSigned-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 108c3dc6
...@@ -1100,13 +1100,13 @@ isolate_migratepages_block(struct compact_control *cc, unsigned long low_pfn, ...@@ -1100,13 +1100,13 @@ isolate_migratepages_block(struct compact_control *cc, unsigned long low_pfn,
bool migrate_dirty; bool migrate_dirty;
/* /*
* Only pages without mappings or that have a * Only folios without mappings or that have
* ->migrate_folio callback are possible to migrate * a ->migrate_folio callback are possible to
* without blocking. However, we can be racing with * migrate without blocking. However, we may
* truncation so it's necessary to lock the page * be racing with truncation, which can free
* to stabilise the mapping as truncation holds * the mapping. Truncation holds the folio lock
* the page lock until after the page is removed * until after the folio is removed from the page
* from the page cache. * cache so holding it ourselves is sufficient.
*/ */
if (!folio_trylock(folio)) if (!folio_trylock(folio))
goto isolate_fail_put; goto isolate_fail_put;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment