Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1205497

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

From Andrew Morton <akpm@linux-foundation.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2 3/5] mm/hwpoison: introduce put_hwpoison_page to put refcount for memory error handling
Date 2015-08-12 01:30 +0200
Message-ID <pWr9w-37t-3@gated-at.bofh.it> (permalink)
References <pVTUe-5qn-17@gated-at.bofh.it> <pVTUf-5qn-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, 10 Aug 2015 19:28:21 +0800 Wanpeng Li <wanpeng.li@hotmail.com> 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 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/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 3/5] mm/hwpoison: introduce put_hwpoison_page to put refcount for memory error handling Wanpeng Li <wanpeng.li@hotmail.com> - 2015-08-10 14:00 +0200
  Re: [PATCH v2 3/5] mm/hwpoison: introduce put_hwpoison_page to put  refcount for memory error handling Andrew Morton <akpm@linux-foundation.org> - 2015-08-12 01:30 +0200
    Re: [PATCH v2 3/5] mm/hwpoison: introduce put_hwpoison_page to put  refcount for memory error handling Wanpeng Li <wanpeng.li@hotmail.com> - 2015-08-12 02:00 +0200
    Re: [PATCH v2 3/5] mm/hwpoison: introduce put_hwpoison_page to put  refcount for memory error handling Wanpeng Li <wanpeng.li@hotmail.com> - 2015-08-12 04:40 +0200
  Re: [PATCH v2 3/5] mm/hwpoison: introduce put_hwpoison_page to put  refcount for memory error handling Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> - 2015-08-12 11:00 +0200

csiph-web