Re: [PATCH v16 07/22] mm/thp: remove code path which never got into
From: Kirill A. Shutemov
Date: Mon Jul 20 2020 - 04:43:31 EST
On Sat, Jul 11, 2020 at 08:58:41AM +0800, Alex Shi wrote:
> split_huge_page() will never call on a page which isn't on lru list, so
> this code never got a chance to run, and should not be run, to add tail
> pages on a lru list which head page isn't there.
>
> Although the bug was never triggered, it'better be removed for code
> correctness.
>
> BTW, it looks better to have BUG() or soem warning set in the wrong
s/soem/some/
> path, but the path will be changed in incomming new page isolation
> func. So just save it here.
Yeah, WARN() would be great. Otherwise I'm okay with the patch
Reviewed-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>
--
Kirill A. Shutemov