[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>
This commit is contained in:
Nick Piggin 2006-03-22 00:08:43 -08:00 committed by Linus Torvalds
parent b7ab795b7b
commit 617d2214ee
1 changed files with 1 additions and 1 deletions

View File

@ -311,7 +311,7 @@ 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);
}