From patchwork Thu Mar 25 04:30:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 409457 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9C7D1C433E0 for ; Thu, 25 Mar 2021 04:31:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 641F661A1A for ; Thu, 25 Mar 2021 04:31:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229508AbhCYEae (ORCPT ); Thu, 25 Mar 2021 00:30:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:43168 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229461AbhCYEa3 (ORCPT ); Thu, 25 Mar 2021 00:30:29 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6FCFC61A14; Thu, 25 Mar 2021 04:30:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1616646628; bh=GzGfcPzU0S+PDow3L08zAISSA1Nd4wMv2D/YAM2pnQI=; h=Date:From:To:Subject:From; b=Uqb+mqRhzXyOreaPXvJpPmVmI47SXbN9eG3w5K4JWGXwblgzaMgcmr56NgmC3dJaC SL2tQkoedwwZTEy2tBuPVnrXXltzCKoMZfr0p13ybjRFoNYzDS2GRcI/e+ZIIeS220 hCaqVhO9BcppeZnzW3ISRFA7W9uqtlzigbxsE3A0= Date: Wed, 24 Mar 2021 21:30:27 -0700 From: akpm@linux-foundation.org To: almasrymina@google.com, aneesh.kumar@linux.vnet.ibm.com, linmiaohe@huawei.com, liwp.linux@gmail.com, lkp@intel.com, mike.kravetz@oracle.com, mm-commits@vger.kernel.org, stable@vger.kernel.org Subject: [folded-merged] hugetlb_cgroup-fix-imbalanced-css_get-and-css_put-pair-for-shared-mappings-v3.patch removed from -mm tree Message-ID: <20210325043027._BMsb1523%akpm@linux-foundation.org> User-Agent: s-nail v14.8.16 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 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 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 Reported-by: kernel test robot (auto build test ERROR) Reviewed-by: Mike Kravetz Cc: Aneesh Kumar K.V Cc: Wanpeng Li Cc: Mina Almasry Cc: Signed-off-by: Andrew Morton --- mm/hugetlb.c | 13 ++++++------- mm/hugetlb_cgroup.c | 3 +-- 2 files changed, 7 insertions(+), 9 deletions(-) --- 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);