Skip to content

Commit

Permalink
mm: migration: clarify migrate_pages() comment
Browse files Browse the repository at this point in the history
Callers of migrate_pages should putback_lru_pages to return pages
isolated to LRU or free list.  Now comment is rather confusing.  It says
caller always have to call it.

It is more clear to point out that the caller has to call it if
migrate_pages's return value isn't zero.

Signed-off-by: Minchan Kim <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Minchan Kim authored and torvalds committed Jan 26, 2011
1 parent 33a9387 commit 28bd657
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/migrate.c
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ static int unmap_and_move_huge_page(new_page_t get_new_page,
* are movable anymore because to has become empty
* or no retryable pages exist anymore.
* Caller should call putback_lru_pages to return pages to the LRU
* or free list.
* or free list only if ret != 0.
*
* Return: Number of pages not migrated or error code.
*/
Expand Down

0 comments on commit 28bd657

Please sign in to comment.