aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mm.h
diff options
context:
space:
mode:
authorNick Piggin <npiggin@suse.de>2006-03-22 03:08:43 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-22 10:54:02 -0500
commit617d2214ee06c209e5c375c280d50abace8058e1 (patch)
treedd2fbf4a2cfa9854ebf27e6f100608c8a0507850 /include/linux/mm.h
parentb7ab795b7bec9997d4fde39f249d52823d36d98d (diff)
[PATCH] mm: optimise page_count
Optimise page_count compound page test and make it consistent with similar functions. Signed-off-by: Nick Piggin <npiggin@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r--include/linux/mm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 7d8c127daad7..6aa016f1d3ae 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -311,7 +311,7 @@ extern void FASTCALL(__page_cache_release(struct page *));
311 311
312static inline int page_count(struct page *page) 312static inline int page_count(struct page *page)
313{ 313{
314 if (PageCompound(page)) 314 if (unlikely(PageCompound(page)))
315 page = (struct page *)page_private(page); 315 page = (struct page *)page_private(page);
316 return atomic_read(&page->_count); 316 return atomic_read(&page->_count);
317} 317}