lkml.org 
[lkml]   [2004]   [Apr]   [23]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateFri, 23 Apr 2004 03:35:22 -0700
FromAndrew Morton <>
SubjectRe: put_page() tries to handle hugepages but fails
William Lee Irwin III <wli@holomorphy.com> wrote:
>> --- wli-2.6.6-rc2-mm1.orig/mm/swap.c	2004-04-21 05:19:58.000000000 -0700
>  +++ wli-2.6.6-rc2-mm1/mm/swap.c	2004-04-23 03:21:22.000000000 -0700
>  @@ -41,15 +41,12 @@
>   	if (unlikely(PageCompound(page))) {
>   		page = (struct page *)page->private;
>   		if (put_page_testzero(page)) {
>  -			if (page[1].mapping) {	/* destructor? */
>  -				(*(void (*)(struct page *))page[1].mapping)(page);
>  -			} else {
>  -				__page_cache_release(page);
>  -			}
>  +			void (*destructor)(struct page *);
>  +			destructor = (void (*)(struct page *))page[1].mapping;
>  +			BUG_ON(!destructor);
>  +			(*destructor)(page);
>   		}
>  -		return;
>  -	}
>  -	if (!PageReserved(page) && put_page_testzero(page))
>  +	} else if (!PageReserved(page) && put_page_testzero(page))
>   		__page_cache_release(page);

Sure.

This of course duplicates huge_page_release(), which can be killed off.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:02    [from the cache]
©2003-2008