Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp839546rwl; Fri, 31 Mar 2023 03:12:47 -0700 (PDT) X-Google-Smtp-Source: AKy350YPUvmava0HhQFvW+yCimgDTfIfNvZd7LA1aSGEpDhODSH/D86HbbnepHIB6glQvukDN5Kp X-Received: by 2002:a17:90a:d58b:b0:23b:4d09:c166 with SMTP id v11-20020a17090ad58b00b0023b4d09c166mr22292761pju.4.1680257566891; Fri, 31 Mar 2023 03:12:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680257566; cv=none; d=google.com; s=arc-20160816; b=lWIdW0g9g6j64lpIbzYyfsP+6QRi+5RqSY6hH6nSG6k9u+rN15X7TxFg0O72Ul704s akwH/smK18TiGzclHAxOZ90ROPrxRnUNbWdxinB6Z8uqxgKskMq9VEOPBXROCs4Li+5q w7l4YMxYyIFfs10/wKYRQ3mcJV/tMjMuXft50x7Uz66wF3yGCJFfO9bTkAptpwMP0tCg BoCQIfkBXFCqVRNsHMCeiIrXJ+gzN1srRG8/Ok5UKM8wW9QxvktYzFFxwLTWGwaBuU+C AMT/54TeCtOUIVv5/0w1okuQpG+M7SI5MVMDs522yoz70CRSx34Aj6yOoDZ3LnraQrr+ 4bSg== 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 :dkim-signature; bh=hIf6WOekKcX5cYk5n6UfHyTuwolCuQ5aOTxYYMf+HPA=; b=YxmrJjFFXiCTX2/HG0R5IvxmNgSbuVGX0Yx474YsHiehyksyLmpY7vjkWA+nJFZWtG ht/w0mjoeUKiPN0Fd4YDZOfVPz3F4jxRUed9UuQF5dAUtwTU7O7SFIZ4Vpp52WVwb9C+ SxPlgPS3O72xLk5BhtzMcbSRZK2W+uO/Cq0Bgyv0JDUD23GMAHljQDAvqO1KEL/whvpk 07gnijEoieEsdj6M3ghtP+NY1m996o7DdWeHfekHJuFkOLzegIUKyBkgGGcYqyRExSCB Vdlwumk7EYYc7mPcf2GddKYK6i5chG9EI5Wq+fJVdsNytgWliLHpJGmNei4PeFVUYZLd xdMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=PtPhmg2a; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o4-20020a63f144000000b00513162c2244si1980032pgk.348.2023.03.31.03.12.33; Fri, 31 Mar 2023 03:12:46 -0700 (PDT) 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; dkim=pass header.i=@bytedance.com header.s=google header.b=PtPhmg2a; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232180AbjCaKF7 (ORCPT + 99 others); Fri, 31 Mar 2023 06:05:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231630AbjCaKFO (ORCPT ); Fri, 31 Mar 2023 06:05:14 -0400 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9963E22EBC for ; Fri, 31 Mar 2023 02:59:42 -0700 (PDT) Received: by mail-pj1-x1036.google.com with SMTP id p13-20020a17090a284d00b0023d2e945aebso8347625pjf.0 for ; Fri, 31 Mar 2023 02:59:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1680256749; x=1682848749; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hIf6WOekKcX5cYk5n6UfHyTuwolCuQ5aOTxYYMf+HPA=; b=PtPhmg2aC8P+Z4aYfe2wqtWdqq0d75n9RQ8QZGKaFFSoQGsEsznX0levtSQfAUQpyE QmaoqKMHKyq6/wvyKOuqug7BvzKHuy4Wq+9cGKRvRDRb4uK9pl9/MXwxtOCMDeixkWFO AJGsLyamMKz79eF4DHPffk3B6A05IsXirDqFUCjz9sluWrOphcBmob3JkKsqaWS2K3tR v7NK4C5XZcOGpXL7F3qVduMlRWL01WXawCXVPBgKjDM9YShB7nXYjAN8JsGRuOWlnUGm H9jD1lHNXyeTKCkKqzVPnjKjuBnCgFRhOSEUPVHDgAFduxFDLbw5XIMdnWymcdxc3M3x O4ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680256749; x=1682848749; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hIf6WOekKcX5cYk5n6UfHyTuwolCuQ5aOTxYYMf+HPA=; b=Kbhz050uh+sTiffr4wH/4pKuimCto0d7QYr8x3PV7kttmGpcAvCn9bYxEjpE55wzbt NvG+GyOjdzwvm9XJ2CEa+lSU+ADC9mvOGxCPakW9PlZxJXmt+8TF9yIC+Eodeb7gSYJI bTdJk89LzlyPOJpeTIq2w4NqQGhvLlyx5ub4XbS+kBOjWSsR4zyZxNa4mLryjcXYM5Ok HBsHd3wuc8sYS+Dcver+1SHVW9PcceKdtJ8CTtOb0Po9XuADA11OGNDjNrbguPYH0q+d fFvQgqZ3CkvId0dqAf6uQsTge121ZbZVkClX3bTaq8oTzKn3UDgM3I0XDUbB06QFRcCA R5iw== X-Gm-Message-State: AAQBX9fXz11rqglcK7VYL+Hbqd7xvK+QDvEm9i2i8qbiyugbP5ia99nz FfmsZ27S0QgU0u0IAdMUn/5irg== X-Received: by 2002:a17:90a:d195:b0:236:7144:669f with SMTP id fu21-20020a17090ad19500b002367144669fmr22262989pjb.2.1680256749585; Fri, 31 Mar 2023 02:59:09 -0700 (PDT) Received: from C02DW0BEMD6R.bytedance.net ([139.177.225.229]) by smtp.gmail.com with ESMTPSA id oo5-20020a17090b1c8500b0023b3179f0fcsm4687782pjb.6.2023.03.31.02.59.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Mar 2023 02:59:09 -0700 (PDT) From: Qi Zheng To: akpm@linux-foundation.org, willy@infradead.org, lstoakes@gmail.com Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Qi Zheng Subject: [PATCH 2/2] mm: mlock: use folios_put() in mlock_folio_batch() Date: Fri, 31 Mar 2023 17:58:58 +0800 Message-Id: <20230331095858.51810-2-zhengqi.arch@bytedance.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: <20230331095858.51810-1-zhengqi.arch@bytedance.com> References: <20230331095858.51810-1-zhengqi.arch@bytedance.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 Since we have updated mlock to use folios, it's better to call folios_put() instead of calling release_pages() directly. Signed-off-by: Qi Zheng --- mm/mlock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/mlock.c b/mm/mlock.c index 617469fce96d..40b43f8740df 100644 --- a/mm/mlock.c +++ b/mm/mlock.c @@ -206,7 +206,7 @@ static void mlock_folio_batch(struct folio_batch *fbatch) if (lruvec) unlock_page_lruvec_irq(lruvec); - release_pages(fbatch->folios, fbatch->nr); + folios_put(fbatch->folios, folio_batch_count(fbatch)); folio_batch_reinit(fbatch); } -- 2.20.1