Message ID | 20230621164557.3510324-3-willy@infradead.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp4525080vqr; Wed, 21 Jun 2023 10:24:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6LVu4BV2QTYSCT368CYedCXd2AmIumNZhgzAiJ8rHfO1qFfER5xg0JACGOJJjnsWYjLoDS X-Received: by 2002:a17:902:dac8:b0:1b1:a4e2:a2e6 with SMTP id q8-20020a170902dac800b001b1a4e2a2e6mr20728569plx.12.1687368288367; Wed, 21 Jun 2023 10:24:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687368288; cv=none; d=google.com; s=arc-20160816; b=VxRgvOhQn26QiHtCkruhsmLqnHo6YYDMsKZhbBHjVyAGNeQBtXDjyL+bP7ISxzOEfl VTnbtPXERvnFAjgL+LFtB3fpHkGy7jQzhogw4ic8WrgnewOpcZKtmqXNarKg7xAWUAVP /6WxARt8K5Z6imuiAGRibk0f4GlotgUJUGrarF4L7RiAbIM5Z/PxgAOEm8ZRzW4Aipab AIb5DgyobhnkwXlHGpp2IWxyQGbVzHArq1ISu5nptDldLR9OAsNtG1QwsBJ7FIyMBvas PXzwcmMNNkbo6pDZTIjK/5L5nunXTjC7UZsi3kHdeo0xiXZfexXIqmcAGdArWGDqutPB aKdA== 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=KFMiCla2naG7Z7vKPwGKVD4TrVn4emFE0PLxxevs+7o=; b=i+4NCx6u0zPPiN6d9+qgwhKE//Gx8zM0dqNuAaPj+ms+xI5Y+cLikPj/1wFQ9tukw6 b5XpBjgAgyNTyUc/qlhLIhEqjBlPaUtdykGnMz05cw30MyOsFB93XFE62OAxOojkABr1 RlLBmuxMLbw4uZbaKSK8wCElMwGPSfPdeIMvq/baXn4cf907ApsS4rFrW7XNiKF3MSPe RzyMCRtMoXH5uEFYg/zwEOv9vX4SnshL9zLYUAf/pv8eIDInsoXML7Suyv9jCff8GTWE qnjh4UHJerrabiWSaIyM3Jr9TusVO2Gs8yYR6LKS60zxlWBMb3s6Sedvu0vtKvyz/mMz 5Yzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=OU4HmcXW; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e4-20020a17090301c400b001b1be1317a1si5319957plh.219.2023.06.21.10.24.34; Wed, 21 Jun 2023 10:24:48 -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=@infradead.org header.s=casper.20170209 header.b=OU4HmcXW; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230415AbjFUQrQ (ORCPT <rfc822;maxin.john@gmail.com> + 99 others); Wed, 21 Jun 2023 12:47:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229809AbjFUQqY (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 21 Jun 2023 12:46:24 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14F4419BE; Wed, 21 Jun 2023 09:46:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=KFMiCla2naG7Z7vKPwGKVD4TrVn4emFE0PLxxevs+7o=; b=OU4HmcXWzyUGQD65hDOdwkgu0o u74l9DMZxcBXT5V4Z5qLLe5pROXO6krjW5ruc1DT0SkscC1GAv6CUiRHqoT/xZNB+FTYdY7HTZcSC 1nPv6XnNmEo7hrUJxM01iosMG8Y0Ym2VcY6jvvzCBkvQC7lZJfWEJjt8YGSGMlqEn7izRDRm51hz1 GMTsyqcMH1J1dyYFMGFeU3Saag7AZyuOX2CkLBm+3ksa29C3VbudjYZzIgY5yxIiJcoHDGi0dytI4 BSi9r/ik6bNx2dBlS0BKcqh1/yQ1YIwWVl75bC6VUoMpy4h0Khgb2dDFrfbmsM3CyCJYXba2lPTTt z9KQ53Ag==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qC0y1-00EjDi-Cc; Wed, 21 Jun 2023 16:46:01 +0000 From: "Matthew Wilcox (Oracle)" <willy@infradead.org> To: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org> Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, linux-afs@lists.infradead.org, linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH 02/13] mm: Add __folio_batch_release() Date: Wed, 21 Jun 2023 17:45:46 +0100 Message-Id: <20230621164557.3510324-3-willy@infradead.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230621164557.3510324-1-willy@infradead.org> References: <20230621164557.3510324-1-willy@infradead.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769333890367435923?= X-GMAIL-MSGID: =?utf-8?q?1769333890367435923?= |
Series |
Remove pagevecs
|
|
Commit Message
Matthew Wilcox
June 21, 2023, 4:45 p.m. UTC
This performs the same role as __pagevec_release(), ie skipping the
check for batch length of 0.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
include/linux/pagevec.h | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/include/linux/pagevec.h b/include/linux/pagevec.h index f582f7213ea5..42aad53e382e 100644 --- a/include/linux/pagevec.h +++ b/include/linux/pagevec.h @@ -127,9 +127,15 @@ static inline unsigned folio_batch_add(struct folio_batch *fbatch, return fbatch_space(fbatch); } +static inline void __folio_batch_release(struct folio_batch *fbatch) +{ + __pagevec_release((struct pagevec *)fbatch); +} + static inline void folio_batch_release(struct folio_batch *fbatch) { - pagevec_release((struct pagevec *)fbatch); + if (folio_batch_count(fbatch)) + __folio_batch_release(fbatch); } void folio_batch_remove_exceptionals(struct folio_batch *fbatch);