]> err.no Git - linux-2.6/blobdiff - include/linux/mm.h
Merge branch 'release' of master.kernel.org:/home/ftp/pub/scm/linux/kernel/git/aegl...
[linux-2.6] / include / linux / mm.h
index 0e266fe1b4c4073787664dfbe15df2aba5cf7724..a17b147c61e74853e51268c3eaf144aee8c37006 100644 (file)
@@ -295,6 +295,24 @@ void put_pages_list(struct list_head *pages);
 
 void split_page(struct page *page, unsigned int order);
 
+/*
+ * Compound pages have a destructor function.  Provide a
+ * prototype for that function and accessor functions.
+ * These are _only_ valid on the head of a PG_compound page.
+ */
+typedef void compound_page_dtor(struct page *);
+
+static inline void set_compound_page_dtor(struct page *page,
+                                               compound_page_dtor *dtor)
+{
+       page[1].lru.next = (void *)dtor;
+}
+
+static inline compound_page_dtor *get_compound_page_dtor(struct page *page)
+{
+       return (compound_page_dtor *)page[1].lru.next;
+}
+
 /*
  * Multiple processes may "see" the same page. E.g. for untouched
  * mappings of /dev/null, all processes see the same page full of