[Linux-cachefs] [PATCH 2/12] FS-Cache: Permit multiple inclusion of linux/pagevec.h

David Howells dhowells at redhat.com
Mon Nov 14 21:54:37 UTC 2005


The attached patch makes it possible to include linux/pagevec.h multiple times
without incurring errors due to duplicate definitions.

Signed-Off-By: David Howells <dhowells at redhat.com>
---
warthog>diffstat -p1 pagevec-hdr-ifndef-2614mm2.diff
 include/linux/pagevec.h |    5 +++++
 1 files changed, 5 insertions(+)

diff -uNrp linux-2.6.14-mm2/include/linux/pagevec.h linux-2.6.14-mm2-cachefs/include/linux/pagevec.h
--- linux-2.6.14-mm2/include/linux/pagevec.h	2005-01-04 11:13:55.000000000 +0000
+++ linux-2.6.14-mm2-cachefs/include/linux/pagevec.h	2005-11-14 16:23:41.000000000 +0000
@@ -5,6 +5,9 @@
  * pages.  A pagevec is a multipage container which is used for that.
  */
 
+#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
 
@@ -83,3 +86,5 @@ static inline void pagevec_lru_add(struc
 	if (pagevec_count(pvec))
 		__pagevec_lru_add(pvec);
 }
+
+#endif /* _LINUX_PAGEVEC_H */




More information about the Linux-cachefs mailing list