mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 06:32:08 +00:00
[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:
parent
b7ab795b7b
commit
617d2214ee
1 changed files with 1 additions and 1 deletions
|
@ -311,7 +311,7 @@ extern void FASTCALL(__page_cache_release(struct page *));
|
||||||
|
|
||||||
static inline int page_count(struct page *page)
|
static inline int page_count(struct page *page)
|
||||||
{
|
{
|
||||||
if (PageCompound(page))
|
if (unlikely(PageCompound(page)))
|
||||||
page = (struct page *)page_private(page);
|
page = (struct page *)page_private(page);
|
||||||
return atomic_read(&page->_count);
|
return atomic_read(&page->_count);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue