mm/page_alloc: correct return value when failing at preparing
authorYanfei Xu <yanfei.xu@windriver.com>
Thu, 15 Jul 2021 04:26:49 +0000 (21:26 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 15 Jul 2021 17:13:49 +0000 (10:13 -0700)
commite5c15cea339115edf99dc92282865f173cf84510
treea1eae9d24bb14b5e06e7ac0f49a4a9e407563cb0
parent187ad460b8413e863c951998cb321a117a717868
mm/page_alloc: correct return value when failing at preparing

If the array passed in is already partially populated, we should return
"nr_populated" even failing at preparing arguments stage.

Link: https://lkml.kernel.org/r/20210713152100.10381-3-mgorman@techsingularity.net
Signed-off-by: Yanfei Xu <yanfei.xu@windriver.com>
Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
Link: https://lore.kernel.org/r/20210709102855.55058-1-yanfei.xu@windriver.com
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/page_alloc.c