]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] mm: optimise page_count
authorNick Piggin <npiggin@suse.de>
Wed, 22 Mar 2006 08:08:43 +0000 (00:08 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 22 Mar 2006 15:54:02 +0000 (07:54 -0800)
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>
include/linux/mm.h

index 7d8c127daad725a4e969f56c662c1aae2ef84d96..6aa016f1d3ae05d4b29e2076431219283b4c689a 100644 (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);
 }