[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <b75d577d0994229f142bcca8ff330c4c587389dd.1672038314.git.lstoakes@gmail.com>
Date: Mon, 26 Dec 2022 07:08:44 +0000
From: Lorenzo Stoakes <lstoakes@...il.com>
To: linux-mm@...ck.org, Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Cc: Matthew Wilcox <willy@...radead.org>,
Hugh Dickins <hughd@...gle.com>,
Vlastimil Babka <vbabka@...e.cz>,
Liam Howlett <liam.howlett@...cle.com>,
William Kucharski <william.kucharski@...cle.com>,
Christian Brauner <brauner@...nel.org>,
Jonathan Corbet <corbet@....net>,
Mike Rapoport <rppt@...nel.org>,
Joel Fernandes <joel@...lfernandes.org>,
Lorenzo Stoakes <lstoakes@...il.com>
Subject: [PATCH v2 1/4] mm: pagevec: add folio_batch_reinit()
This performs the same task as pagevec_reinit(), only modifying a folio
batch rather than a pagevec.
Signed-off-by: Lorenzo Stoakes <lstoakes@...il.com>
---
include/linux/pagevec.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/linux/pagevec.h b/include/linux/pagevec.h
index 215eb6c3bdc9..2a6f61a0c10a 100644
--- a/include/linux/pagevec.h
+++ b/include/linux/pagevec.h
@@ -103,6 +103,11 @@ static inline void folio_batch_init(struct folio_batch *fbatch)
fbatch->percpu_pvec_drained = false;
}
+static inline void folio_batch_reinit(struct folio_batch *fbatch)
+{
+ fbatch->nr = 0;
+}
+
static inline unsigned int folio_batch_count(struct folio_batch *fbatch)
{
return fbatch->nr;
--
2.39.0
Powered by blists - more mailing lists