1
0
Fork 0

VM: allow get_page_unless_zero on compound pages

Both slab defrag and the large blocksize patches need to ability to take
refcounts on compound pages.  May be useful in other places as well.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
hifive-unleashed-5.1
Christoph Lameter 2008-02-04 22:28:35 -08:00 committed by Linus Torvalds
parent bf53d6f8fa
commit aec2c3ed01
1 changed files with 1 additions and 1 deletions

View File

@ -227,7 +227,7 @@ static inline int put_page_testzero(struct page *page)
*/
static inline int get_page_unless_zero(struct page *page)
{
VM_BUG_ON(PageCompound(page));
VM_BUG_ON(PageTail(page));
return atomic_inc_not_zero(&page->_count);
}