diff mbox series

[folded-merged] hugetlb_cgroup-fix-imbalanced-css_get-and-css_put-pair-for-shared-mappings-v3.patchremoved from -mm tree

Message ID 20210325043027._BMsb1523%akpm@linux-foundation.org
State New
Headers show
Series [folded-merged] hugetlb_cgroup-fix-imbalanced-css_get-and-css_put-pair-for-shared-mappings-v3.patchremoved from -mm tree | expand

Commit Message

Andrew Morton March 25, 2021, 4:30 a.m. UTC
The patch titled
     Subject: hugetlb_cgroup: fix imbalanced css_get and css_put pair for shared mappings
has been removed from the -mm tree.  Its filename was
     hugetlb_cgroup-fix-imbalanced-css_get-and-css_put-pair-for-shared-mappings-v3.patch

This patch was dropped because it was folded into hugetlb_cgroup-fix-imbalanced-css_get-and-css_put-pair-for-shared-mappings.patch

------------------------------------------------------
From: Miaohe Lin <linmiaohe@huawei.com>
Subject: hugetlb_cgroup: fix imbalanced css_get and css_put pair for shared mappings

reshape some comments, per Mike

Link: https://lkml.kernel.org/r/20210316023002.53921-1-linmiaohe@huawei.com
Fixes: 075a61d07a8e ("hugetlb_cgroup: add accounting for shared mappings")
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Reported-by: kernel test robot <lkp@intel.com> (auto build test ERROR)
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Cc: Wanpeng Li <liwp.linux@gmail.com>
Cc: Mina Almasry <almasrymina@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/hugetlb.c        |   13 ++++++-------
 mm/hugetlb_cgroup.c |    3 +--
 2 files changed, 7 insertions(+), 9 deletions(-)
diff mbox series

Patch

--- a/mm/hugetlb.c~hugetlb_cgroup-fix-imbalanced-css_get-and-css_put-pair-for-shared-mappings-v3
+++ a/mm/hugetlb.c
@@ -281,13 +281,12 @@  static void record_hugetlb_cgroup_unchar
 			&h_cg->rsvd_hugepage[hstate_index(h)];
 		nrg->css = &h_cg->css;
 		/*
-		 * The caller (hugetlb_reserve_pages now) will only hold one
-		 * h_cg->css reference for the whole contiguous reservation
-		 * region. But this area might be scattered when there are
-		 * already some file_regions reside in it. As a result, many
-		 * file_regions may share only one h_cg->css reference. In
-		 * order to ensure that one file_region must hold and only
-		 * hold one h_cg->css reference, we should do css_get for
+		 * The caller will hold exactly one h_cg->css reference for the
+		 * whole contiguous reservation region. But this area might be
+		 * scattered when there are already some file_regions reside in
+		 * it. As a result, many file_regions may share only one css
+		 * reference. In order to ensure that one file_region must hold
+		 * exactly one h_cg->css reference, we should do css_get for
 		 * each file_region and leave the reference held by caller
 		 * untouched.
 		 */
--- a/mm/hugetlb_cgroup.c~hugetlb_cgroup-fix-imbalanced-css_get-and-css_put-pair-for-shared-mappings-v3
+++ a/mm/hugetlb_cgroup.c
@@ -403,8 +403,7 @@  void hugetlb_cgroup_uncharge_file_region
 				      nr_pages * resv->pages_per_hpage);
 		/*
 		 * Only do css_put(rg->css) when we delete the entire region
-		 * because one file_region must hold and only hold one rg->css
-		 * reference.
+		 * because one file_region must hold exactly one css reference.
 		 */
 		if (region_del)
 			css_put(rg->css);