Re: [PATCH v2 3/5] mm/hwpoison: introduce put_hwpoison_page to put refcount for memory error handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 10 Aug 2015 19:28:21 +0800 Wanpeng Li <wanpeng.li@xxxxxxxxxxx> wrote:

> Introduce put_hwpoison_page to put refcount for memory 
> error handling. 
> 
> ...
>
> --- a/mm/memory-failure.c
> +++ b/mm/memory-failure.c
> @@ -922,6 +922,27 @@ int get_hwpoison_page(struct page *page)
>  }
>  EXPORT_SYMBOL_GPL(get_hwpoison_page);
>  
> +/**
> + * put_hwpoison_page() - Put refcount for memory error handling:
> + * @page:	raw error page (hit by memory error)
> + */
> +void put_hwpoison_page(struct page *page)
> +{
> +	struct page *head = compound_head(page);
> +
> +	if (PageHuge(head)) {
> +		put_page(head);
> +		return;
> +	}
> +
> +	if (PageTransHuge(head))
> +		if (page != head)
> +			put_page(head);
> +
> +	put_page(page);
> +}
> +EXPORT_SYMBOL_GPL(put_hwpoison_page);

I don't believe the export is needed?

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]