Linux MM tree latest commits
 help / color / mirror / Atom feed
* + hugetlb-fix-an-error-code-in-hugetlb_reserve_pages.patch added to -mm tree
@ 2020-12-11 19:42 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2020-12-11 19:42 UTC (permalink / raw)
  To: almasrymina, dan.carpenter, mike.kravetz, mm-commits, rientjes


The patch titled
     Subject: hugetlb: Fix an error code in hugetlb_reserve_pages()
has been added to the -mm tree.  Its filename is
     hugetlb-fix-an-error-code-in-hugetlb_reserve_pages.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/hugetlb-fix-an-error-code-in-hugetlb_reserve_pages.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/hugetlb-fix-an-error-code-in-hugetlb_reserve_pages.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: Dan Carpenter <dan.carpenter@oracle.com>
Subject: hugetlb: Fix an error code in hugetlb_reserve_pages()

Preserve the error code from region_add() instead of returning success.

Link: https://lkml.kernel.org/r/X9NGZWnZl5/Mt99R@mwanda
Fixes: 0db9d74ed884 ("hugetlb: disable region_add file_region coalescing")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Mina Almasry <almasrymina@google.com>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/hugetlb.c |    1 +
 1 file changed, 1 insertion(+)

--- a/mm/hugetlb.c~hugetlb-fix-an-error-code-in-hugetlb_reserve_pages
+++ a/mm/hugetlb.c
@@ -5113,6 +5113,7 @@ int hugetlb_reserve_pages(struct inode *
 
 		if (unlikely(add < 0)) {
 			hugetlb_acct_memory(h, -gbl_reserve);
+			ret = add;
 			goto out_put_pages;
 		} else if (unlikely(chg > add)) {
 			/*
_

Patches currently in -mm which might be from dan.carpenter@oracle.com are

hugetlb-fix-an-error-code-in-hugetlb_reserve_pages.patch


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

only message in thread, other threads:[~2020-12-11 21:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-11 19:42 + hugetlb-fix-an-error-code-in-hugetlb_reserve_pages.patch added to -mm tree akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox