Message ID | 20230331095858.51810-2-zhengqi.arch@bytedance.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 60B6FC76196 for <linux-mm@archiver.kernel.org>; Fri, 31 Mar 2023 09:59:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E57816B0072; Fri, 31 Mar 2023 05:59:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DDF8D6B0074; Fri, 31 Mar 2023 05:59:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C0B9A6B0075; Fri, 31 Mar 2023 05:59:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id B228A6B0072 for <linux-mm@kvack.org>; Fri, 31 Mar 2023 05:59:12 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 88145C0108 for <linux-mm@kvack.org>; Fri, 31 Mar 2023 09:59:12 +0000 (UTC) X-FDA: 80628745344.25.DBD5EEF Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by imf25.hostedemail.com (Postfix) with ESMTP id AB2FDA000C for <linux-mm@kvack.org>; Fri, 31 Mar 2023 09:59:10 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=bytedance.com header.s=google header.b=PtPhmg2a; spf=pass (imf25.hostedemail.com: domain of zhengqi.arch@bytedance.com designates 209.85.216.48 as permitted sender) smtp.mailfrom=zhengqi.arch@bytedance.com; dmarc=pass (policy=quarantine) header.from=bytedance.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1680256750; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=hIf6WOekKcX5cYk5n6UfHyTuwolCuQ5aOTxYYMf+HPA=; b=TwfGL4gcPoaYffpRSFYsMsCm6aTUxYGTtvjsHCAEu2FYsWcDff2Co/v89Q/sWXRoat4CQG 3EW3Z3dM+SqpsorKOL1KLRhDFjfqagvA5OMgtNAxQck2sGWEBc9svYOneMs47IT7nPHLeN GKTmKHAg56g3FCH8E41LAs/hjDEMAS0= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=bytedance.com header.s=google header.b=PtPhmg2a; spf=pass (imf25.hostedemail.com: domain of zhengqi.arch@bytedance.com designates 209.85.216.48 as permitted sender) smtp.mailfrom=zhengqi.arch@bytedance.com; dmarc=pass (policy=quarantine) header.from=bytedance.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1680256750; a=rsa-sha256; cv=none; b=IUpayR8rWImJmP4Ar6rjxbxy91AM+U6XhWXIgrD1sgDqRjHn44xvqYv6OFJEUj6eTHNpfq k5fbAjWAFQrukn8zHFdHbu1Z6d978IKkx29k/+j7GpJoLYimBTgg40sl9UzJY8TG3Zoc7o ELCRjMEUHybY9DWjRr91NQpBK10XcCI= Received: by mail-pj1-f48.google.com with SMTP id d13so19949942pjh.0 for <linux-mm@kvack.org>; Fri, 31 Mar 2023 02:59:10 -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=nkYwlrJaEU2lnUYD5HFGYl1KGyvkZuPEw1Zk0G5oydDA4bmGaJr/s08FI9WjQs9MRq bP7r4a8mhJwtB/pEpZuiqMhm0lJYIxxriEhG/7BKFW4GxFuZjC7nxDCzWUMmtTTFiaiQ BhHqFGXkkEmGnT/NUZsxpLdyYhbwX8NfkFJXCbeso1VygmLSfl2RwZzQcfBn6IKgo+BO EDE5xc7F8bI87c0LSakfLu4IyW3xmvm7tnt7TSFwV3qlT0Pbjuc6ul1eA6i9t6BK84tq 3ko/xwPw2q2Qu7VTKCO/WBO+db/v3w1rndXLQYf8OJESp8R8K8f3oL2ZY7u9NR09j2Rc dlpQ== X-Gm-Message-State: AAQBX9ege5hsc92DpMC20JegzDns55PZMQ4vQ2LOpgS6U0B++nvwf6xP b7qEwhKIrw+IfpR2wvNMQUHJPg== X-Google-Smtp-Source: AKy350bQYsmvZCOvPIdQYw8Q5eFd+Wh2raKdTzdYDwVhc3Nb0vtD/ATqqq41Bz/ZUdCmYm+HG/JQRQ== 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 <zhengqi.arch@bytedance.com> To: akpm@linux-foundation.org, willy@infradead.org, lstoakes@gmail.com Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Qi Zheng <zhengqi.arch@bytedance.com> 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-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: AB2FDA000C X-Stat-Signature: jpg9zme3cqa6bubkney3hg354h1yrdkm X-Rspam-User: X-HE-Tag: 1680256750-5882 X-HE-Meta: U2FsdGVkX1+fcD+tpui5ytDe3NtIr/eu5lgX/8d4tY5kc0VEAPhUY8Ycl/64N3/1AbvLbuQAym0n45AT2vfs/lrTASI3O1RhEZcdBEhho8dKU9c96llz3VA+jWv2lk3niz4qIhIormrizyA1W1CbbfC/5P/K0o3yXpzK/FgjYmgxiKddYkLivCsAnaJhOqKyk7qqp/gEt2RxluJhEiva0LLJ6YUEEvghPqk3bTs+q6UM3A8vQy6htp1fOd9lAFm/ZjMhEU8ixzvqcFIpKngKKHkPtBWx3wliOqtyvz7d38j8jErjnTCJbyFHB9oT9f9SBCuNyKM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HZPpdzg80dI3ad3a4zmLRYU97S+ekvqa3lXefhkPXQe1V1D5VRuo1sLTT4F5dBbMgOzgwZ3bmk X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
[1/2] mm: swap: use folio_batch_reinit() in folio_batch_move_lru()
|
expand
|
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); }
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 <zhengqi.arch@bytedance.com> --- mm/mlock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)