Re: [PATCH v1] mm: hwpoison: adjust for new thp refcounting

2015-11-05 Thread Naoya Horiguchi
On Fri, Nov 06, 2015 at 01:31:49AM -0500, Sasha Levin wrote:
> On 11/06/2015 01:11 AM, Naoya Horiguchi wrote:
> > In the new refcounting, we no longer use tail->_mapcount to keep tail's
> > refcount, and thereby we can simplify get_hwpoison_page() and remove
> > put_hwpoison_page() (by replacing with put_page()).
> 
> This is confusing for the reader (and some static analysis tools): this adds
> put_page()s without corresponding get_page()s.
> 
> Could we instead macro put_hwpoison_page() as put_page() for the sake of 
> readability?

OK, I'll do this.

Thanks,
Naoya Horiguchi--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v1] mm: hwpoison: adjust for new thp refcounting

2015-11-05 Thread Sasha Levin
On 11/06/2015 01:11 AM, Naoya Horiguchi wrote:
> In the new refcounting, we no longer use tail->_mapcount to keep tail's
> refcount, and thereby we can simplify get_hwpoison_page() and remove
> put_hwpoison_page() (by replacing with put_page()).

This is confusing for the reader (and some static analysis tools): this adds
put_page()s without corresponding get_page()s.

Could we instead macro put_hwpoison_page() as put_page() for the sake of 
readability?


Thanks,
Sasha
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/