Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp2368186pxb; Sat, 19 Feb 2022 09:17:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJxTMiXHsnCm8cpLANkLeBstOsT4MJClrnKmiBtI4eyHEFVypoEnhlmIAOfTj+NHtHmEzkmQ X-Received: by 2002:a62:8c8f:0:b0:4cf:4c5:b2ad with SMTP id m137-20020a628c8f000000b004cf04c5b2admr13003272pfd.71.1645291032867; Sat, 19 Feb 2022 09:17:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645291032; cv=none; d=google.com; s=arc-20160816; b=YHNlorXRrascMgFEd4Q1fsUQrQLc6rdXsogrWK6cX+JLY+QBkWIuPrhCM2bCSpIn05 7VofeLlpHRUYCzWvEK4jEZwAoS7fnfBlzTtJ+/Q1TlyI53g58DEThmWeeW1jt13A1MJO fxe9UxXZzpPLLraWGtnMz5Kr826mApxOyogTvT6VfOboHQ/r7KEq7nrG25DbpwfSFUjj lADzZMqeHZ4aT6KhgmWg92JYFBzJTWFQR3riY4Ct7o6V/YX3/GzjWcLPq/gVyJalzfrS ERPDw8lsee/xOu7JHXYWDdGIt5KuA09tDrpeCMTgYVwYcrrHAveKttkjwY7Drmk28blD m0zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=l8HQEyVA1nuThzJ99l7uOsHAJp7lvL79fulH/pSmTGw=; b=OHbEckojMb6TNiT94elhrUZcr3c8VXm6oSu2rTRZoRFO5n0DfxE3Fk0j7/js2fu3tx OS5DgSn6Jh15LnqtlAb+oGQmiaS7+aCfpb6+1XHES1QOaqk/9sz8KP5YR3Sh04lswqKH xarE3G7BH1NmPeITNbuaJm+oVIddqZkl9OSTL6kW0N0s6oQzNZugyjvXMq+0O89RBWLI s6dP6kE352Ks347LJ9Vsxn0RKEJWOp4tR4u56NCkC2f63puFW485BS8927fivrqkS6aj 4plXUEiCUCR/plTgNjAxA/Wx6pnw0pX/+IClxsXL627rbls7ieuSNIfTYkTqiotRqibw zUdw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l22si5912828pfc.103.2022.02.19.09.16.42; Sat, 19 Feb 2022 09:17:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241813AbiBSJ0r (ORCPT + 99 others); Sat, 19 Feb 2022 04:26:47 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:57816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241785AbiBSJ0l (ORCPT ); Sat, 19 Feb 2022 04:26:41 -0500 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC87E24CCDE for ; Sat, 19 Feb 2022 01:26:22 -0800 (PST) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.56]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4K134y0LKzz8w8r; Sat, 19 Feb 2022 17:22:58 +0800 (CST) Received: from huawei.com (10.175.124.27) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Sat, 19 Feb 2022 17:26:20 +0800 From: Miaohe Lin To: CC: , , , Subject: [PATCH 3/9] mm/z3fold: minor clean up for z3fold_free Date: Sat, 19 Feb 2022 17:25:27 +0800 Message-ID: <20220219092533.12596-4-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20220219092533.12596-1-linmiaohe@huawei.com> References: <20220219092533.12596-1-linmiaohe@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use put_z3fold_header() to pair with get_z3fold_header. Also fix the wrong comments. Minor readability improvement. Signed-off-by: Miaohe Lin --- mm/z3fold.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mm/z3fold.c b/mm/z3fold.c index 87689f50f709..eb89271aea83 100644 --- a/mm/z3fold.c +++ b/mm/z3fold.c @@ -1187,9 +1187,9 @@ static int z3fold_alloc(struct z3fold_pool *pool, size_t size, gfp_t gfp, * @handle: handle associated with the allocation returned by z3fold_alloc() * * In the case that the z3fold page in which the allocation resides is under - * reclaim, as indicated by the PG_reclaim flag being set, this function - * only sets the first|last_chunks to 0. The page is actually freed - * once both buddies are evicted (see z3fold_reclaim_page() below). + * reclaim, as indicated by the PAGE_CLAIMED flag being set, this function + * only sets the first|middle|last_chunks to 0. The page is actually freed + * once all buddies are evicted (see z3fold_reclaim_page() below). */ static void z3fold_free(struct z3fold_pool *pool, unsigned long handle) { @@ -1247,7 +1247,7 @@ static void z3fold_free(struct z3fold_pool *pool, unsigned long handle) } if (page_claimed) { /* the page has not been claimed by us */ - z3fold_page_unlock(zhdr); + put_z3fold_header(zhdr); return; } if (test_and_set_bit(NEEDS_COMPACTING, &page->private)) { -- 2.23.0