From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Lameter Subject: [25/41] compound pages: Allow use of get_page_unless_zero with compound pages Date: Mon, 10 Sep 2007 23:04:15 -0700 Message-ID: <20070911060431.361306886@sgi.com> References: <20070911060349.993975297@sgi.com> Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: torvalds@linux-foundation.org Return-path: Received: from netops-testserver-3-out.sgi.com ([192.48.171.28]:50596 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1761469AbXIKGEc (ORCPT ); Tue, 11 Sep 2007 02:04:32 -0400 Cc: Christoph Hellwig , Mel Gorman Cc: William Lee Irwin III , David Chinner Cc: Jens Axboe , Badari Pulavarty Cc: Maxim Levitsky , Fengguang Wu Cc: swin wang , totty.lu@gmail.com, hugh@veritas.com Cc: joern@lazybastard.org Content-Disposition: inline; filename=0025-compound-pages-Allow-use-of-get_page_unless_zero-wi.patch Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org This is needed by slab defragmentation. The refcount of a page head may be incremented to ensure that a compound page will not go away under us. It also may be needed for defragmentation of higher order pages. The moving of compound pages may require the establishment of a reference before the use of page migration functions. Signed-off-by: Christoph Lameter --- include/linux/mm.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index 6f3a8d6..a8a0378 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -290,7 +290,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); } -- 1.5.2.5 --