mm: memory: use nth_page() in clear/copy_subpage()
authorKefeng Wang <wangkefeng.wang@huawei.com>
Fri, 29 Dec 2023 08:22:07 +0000 (16:22 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 22 Feb 2024 00:00:02 +0000 (16:00 -0800)
commit21fff064a26dc93d7ff24e36f35197fec809beee
tree2c89465cb41d3d6b6dc62c978b49e020e57b9938
parent30afc8c34290184c023fa79136ce5f8813fc73da
mm: memory: use nth_page() in clear/copy_subpage()

The clear and copy of huge gigantic page has converted to use nth_page()
to handle the possible discontinuous struct page(SPARSEMEM without
VMEMMAP), but not change for the non-gigantic part, fix it too.

Link: https://lkml.kernel.org/r/20231229082207.60235-1-wangkefeng.wang@huawei.com
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Zi Yan <ziy@nvidia.com>
Cc: David Hildenbrand <david@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memory.c