[PATCH 49/74] pvec

Chris Wilson chris at chris-wilson.co.uk
Thu Sep 14 17:34:23 UTC 2017


---
 include/linux/pagevec.h | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/include/linux/pagevec.h b/include/linux/pagevec.h
index b45d391b4540..2f348a845a25 100644
--- a/include/linux/pagevec.h
+++ b/include/linux/pagevec.h
@@ -8,16 +8,16 @@
 #ifndef _LINUX_PAGEVEC_H
 #define _LINUX_PAGEVEC_H
 
-/* 14 pointers + two long's align the pagevec structure to a power of two */
-#define PAGEVEC_SIZE	14
+/* 15 pointers + two long's align the pagevec structure to a power of two */
+#define PAGEVEC_SIZE	15
 
 struct page;
 struct address_space;
 
 struct pagevec {
-	unsigned long nr;
-	unsigned long cold;
 	struct page *pages[PAGEVEC_SIZE];
+	u8 nr;
+	u8 cold;
 };
 
 void __pagevec_release(struct pagevec *pvec);
@@ -35,6 +35,7 @@ unsigned pagevec_lookup_tag(struct pagevec *pvec,
 
 static inline void pagevec_init(struct pagevec *pvec, int cold)
 {
+	BUILD_BUG_ON_NOT_POWER_OF_2(sizeof(*pvec));
 	pvec->nr = 0;
 	pvec->cold = cold;
 }
-- 
2.14.1



More information about the Intel-gfx-trybot mailing list