diff mbox series

[nacked] mm-move_pages-fix-the-return-value-if-there-are-not-migrated-pages.patch removed from -mm tree

Message ID 20200121212726.WdBeK%akpm@linux-foundation.org
State Superseded
Headers show
Series [nacked] mm-move_pages-fix-the-return-value-if-there-are-not-migrated-pages.patch removed from -mm tree | expand

Commit Message

Andrew Morton Jan. 21, 2020, 9:27 p.m. UTC
The patch titled
     Subject: mm/migrate.c: move_pages: fix the return value if there are not-migrated pages
has been removed from the -mm tree.  Its filename was
     mm-move_pages-fix-the-return-value-if-there-are-not-migrated-pages.patch

This patch was dropped because it was nacked

------------------------------------------------------
From: Yang Shi <yang.shi@linux.alibaba.com>
Subject: mm/migrate.c: move_pages: fix the return value if there are not-migrated pages

do_move_pages_to_node() might return > 0 value, the number of pages that
are not migrated, then the value will be returned to userspace directly. 
But, move_pages() syscall would just return 0 or errno.  So, we need reset
the return value to 0 for such case as pre-v4.17 did.

Link: http://lkml.kernel.org/r/1579325203-16405-1-git-send-email-yang.shi@linux.alibaba.com
Fixes: a49bd4d71637 ("mm, numa: rework do_pages_move")
Signed-off-by: Yang Shi <yang.shi@linux.alibaba.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Wei Yang <richardw.yang@linux.intel.com>
Cc: <stable@vger.kernel.org>    [4.17+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/migrate.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

--- a/mm/migrate.c~mm-move_pages-fix-the-return-value-if-there-are-not-migrated-pages
+++ a/mm/migrate.c
@@ -1659,8 +1659,11 @@  static int do_pages_move(struct mm_struc
 			goto out_flush;
 
 		err = do_move_pages_to_node(mm, &pagelist, current_node);
-		if (err)
+		if (err) {
+			if (err > 0)
+				err = 0;
 			goto out;
+		}
 		if (i > start) {
 			err = store_status(status, start, current_node, i - start);
 			if (err)