projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f5f288a
)
mm: add __folio_batch_release()
author
Matthew Wilcox (Oracle)
<willy@infradead.org>
Wed, 21 Jun 2023 16:45:46 +0000
(17:45 +0100)
committer
Andrew Morton
<akpm@linux-foundation.org>
Fri, 23 Jun 2023 23:59:28 +0000
(16:59 -0700)
This performs the same role as __pagevec_release(), ie skipping the check
for batch length of 0.
Link:
https://lkml.kernel.org/r/20230621164557.3510324-3-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/pagevec.h
patch
|
blob
|
history
diff --git
a/include/linux/pagevec.h
b/include/linux/pagevec.h
index
f582f72
..
42aad53
100644
(file)
--- 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);