diff options
author | Christoph Lameter <clameter@sgi.com> | 2007-05-07 01:49:41 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-07 23:12:54 +0400 |
commit | b49af68ff9fc5d6e0d96704a1843968b91cc73c6 (patch) | |
tree | eb5e6d9425a9069cdfc45b09a1d0f61f1419d2c2 /include/linux/mm.h | |
parent | 6d7779538f765963ced45a3fa4bed7ba8d2c277d (diff) | |
download | linux-b49af68ff9fc5d6e0d96704a1843968b91cc73c6.tar.xz |
Add virt_to_head_page and consolidate code in slab and slub
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 695b90437bbc..4670ebd1f622 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -286,6 +286,12 @@ static inline void get_page(struct page *page) atomic_inc(&page->_count); } +static inline struct page *virt_to_head_page(const void *x) +{ + struct page *page = virt_to_page(x); + return compound_head(page); +} + /* * Setup the page count before being freed into the page allocator for * the first time (boot or memory hotplug) |