aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r--include/linux/mm.h6
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)
286 atomic_inc(&page->_count); 286 atomic_inc(&page->_count);
287} 287}
288 288
289static inline struct page *virt_to_head_page(const void *x)
290{
291 struct page *page = virt_to_page(x);
292 return compound_head(page);
293}
294
289/* 295/*
290 * Setup the page count before being freed into the page allocator for 296 * Setup the page count before being freed into the page allocator for
291 * the first time (boot or memory hotplug) 297 * the first time (boot or memory hotplug)