Let's change the comment above add_page_for_migration(), to read:
ÂÂÂÂÂÂÂ /*
ÂÂÂÂÂÂÂÂ * Most errors in the page lookup or isolation are not fatal
ÂÂÂÂÂÂÂÂ * and we simply report them via the status array. However,
ÂÂÂÂÂÂÂÂ * positive error values are fatal.
ÂÂÂÂÂÂÂÂ */
ÂÂÂÂÂÂÂÂÂ err = add_page_for_migration(mm, addr, current_node,
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ &pagelist, flags & MPOL_MF_MOVE_ALL);
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ &pagelist, flags & MPOL_MF_MOVE_ALL, status,
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ i);
+
ÂÂÂÂÂÂÂÂÂ if (!err)
ÂÂÂÂÂÂÂÂÂÂÂÂÂ continue;
+ÂÂÂÂÂÂÂ /* store_status() failed in add_page_for_migration() */
...and let's replace the above line, with the following:
+ÂÂÂÂÂÂÂ if (err > 0) {
+ÂÂÂÂÂÂÂÂÂÂÂ err = -EFAULT;
+ÂÂÂÂÂÂÂÂÂÂÂ goto out_flush;
+ÂÂÂÂÂÂÂ }
+
ÂÂÂÂÂÂÂÂÂ err = store_status(status, i, err, 1);
ÂÂÂÂÂÂÂÂÂ if (err)
ÂÂÂÂÂÂÂÂÂÂÂÂÂ goto out_flush;