]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm: migration: clarify migrate_pages() comment
authorMinchan Kim <minchan.kim@gmail.com>
Tue, 25 Jan 2011 23:07:26 +0000 (15:07 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 26 Jan 2011 00:50:02 +0000 (10:50 +1000)
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 <minchan.kim@gmail.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/migrate.c

index 46fe8cc13d67f3acf80653434223577084fd8fcf..9f29a3b7aac2242c511b8a783226c247af301993 100644 (file)
@@ -888,7 +888,7 @@ out:
  * 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.
  */