mm/migrate.c: wrap do_move_pages_to_node() and store_status()
authorWei Yang <richardw.yang@linux.intel.com>
Tue, 7 Apr 2020 03:04:12 +0000 (20:04 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 7 Apr 2020 17:43:38 +0000 (10:43 -0700)
commit7ca8783ad816972f0c64a189b8ba6615c6b78521
treed4d7c3c04260d7393c866eedebfd0590f32014a5
parent4afdacec2e313509bf9c25f3370be299a0d60b9a
mm/migrate.c: wrap do_move_pages_to_node() and store_status()

Usually, do_move_pages_to_node() and store_status() are used in
combination.  We have three similar call sites.

Let's provide a wrapper for both function calls -
move_pages_and_store_status - to make the calling code easier to maintain
and fix (as noted by Yang Shi, the return value handling of
do_move_pages_to_node() has a flaw).

[david@redhat.com rephrase changelog]
Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Link: http://lkml.kernel.org/r/20200214003017.25558-3-richardw.yang@linux.intel.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/migrate.c