All of lore.kernel.org
 help / color / mirror / Atom feed
* + mm-page_alloc-correct-return-value-when-failing-at-preparing.patch added to -mm tree
@ 2021-07-13 23:15 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2021-07-13 23:15 UTC (permalink / raw)
  To: mgorman, mm-commits, yanfei.xu


The patch titled
     Subject: mm/page_alloc: correct return value when failing at preparing
has been added to the -mm tree.  Its filename is
     mm-page_alloc-correct-return-value-when-failing-at-preparing.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/mm-page_alloc-correct-return-value-when-failing-at-preparing.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/mm-page_alloc-correct-return-value-when-failing-at-preparing.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Yanfei Xu <yanfei.xu@windriver.com>
Subject: 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>
---

 mm/page_alloc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/page_alloc.c~mm-page_alloc-correct-return-value-when-failing-at-preparing
+++ a/mm/page_alloc.c
@@ -5255,7 +5255,7 @@ unsigned long __alloc_pages_bulk(gfp_t g
 	gfp &= gfp_allowed_mask;
 	alloc_gfp = gfp;
 	if (!prepare_alloc_pages(gfp, 0, preferred_nid, nodemask, &ac, &alloc_gfp, &alloc_flags))
-		return 0;
+		return nr_populated;
 	gfp = alloc_gfp;
 
 	/* Find an allowed local zone that meets the low watermark. */
_

Patches currently in -mm which might be from yanfei.xu@windriver.com are

mm-page_alloc-correct-return-value-when-failing-at-preparing.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-13 23:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-13 23:15 + mm-page_alloc-correct-return-value-when-failing-at-preparing.patch added to -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.