]> err.no Git - linux-2.6/blobdiff - include/linux/mm.h
[NETFILTER]: H.323 helper: move some function prototypes to ip_conntrack_h323.h
[linux-2.6] / include / linux / mm.h
index 9bbddf228cd9493336be6d05765e44e47ffabfa2..6aa016f1d3ae05d4b29e2076431219283b4c689a 100644 (file)
@@ -307,14 +307,11 @@ static inline int get_page_unless_zero(struct page *page)
        return atomic_inc_not_zero(&page->_count);
 }
 
-#define set_page_count(p,v)    atomic_set(&(p)->_count, (v))
-#define __put_page(p)          atomic_dec(&(p)->_count)
-
 extern void FASTCALL(__page_cache_release(struct page *));
 
 static inline int page_count(struct page *page)
 {
-       if (PageCompound(page))
+       if (unlikely(PageCompound(page)))
                page = (struct page *)page_private(page);
        return atomic_read(&page->_count);
 }
@@ -326,8 +323,19 @@ static inline void get_page(struct page *page)
        atomic_inc(&page->_count);
 }
 
+/*
+ * Setup the page count before being freed into the page allocator for
+ * the first time (boot or memory hotplug)
+ */
+static inline void init_page_count(struct page *page)
+{
+       atomic_set(&page->_count, 1);
+}
+
 void put_page(struct page *page);
 
+void split_page(struct page *page, unsigned int order);
+
 /*
  * Multiple processes may "see" the same page. E.g. for untouched
  * mappings of /dev/null, all processes see the same page full of
@@ -1040,7 +1048,7 @@ int in_gate_area_no_task(unsigned long addr);
 
 int drop_caches_sysctl_handler(struct ctl_table *, int, struct file *,
                                        void __user *, size_t *, loff_t *);
-int shrink_slab(unsigned long scanned, gfp_t gfp_mask,
+unsigned long shrink_slab(unsigned long scanned, gfp_t gfp_mask,
                        unsigned long lru_pages);
 void drop_pagecache(void);
 void drop_slab(void);