mm/mempolicy: clean up the code logic in queue_pages_pte_range
authorMiaohe Lin <linmiaohe@huawei.com>
Fri, 29 Apr 2022 06:16:06 +0000 (23:16 -0700)
committerakpm <akpm@linux-foundation.org>
Fri, 29 Apr 2022 06:16:06 +0000 (23:16 -0700)
commitbc78b5ed9ff2359f8af1454ee98670b1dc79f06e
tree2e7f796b1e20398a62d41be8c268b9a64c4856f9
parentda63dc84befaa9e6079a0bc363ff0eaa975f9073
mm/mempolicy: clean up the code logic in queue_pages_pte_range

Since commit e5947d23edd8 ("mm: mempolicy: don't have to split pmd for
huge zero page"), THP is never splited in queue_pages_pmd.  Thus 2 is
never returned now.  We can remove such unnecessary ret != 2 check and
clean up the relevant comment.  Minor improvements in readability.

Link: https://lkml.kernel.org/r/20220419122234.45083-1-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Reviewed-by: Yang Shi <shy828301@gmail.com>
Acked-by: David Rientjes <rientjes@google.com>
Cc: Zi Yan <ziy@nvidia.com>
Cc: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/mempolicy.c