]> www.infradead.org Git - nvme.git/commit
mm: memory: improve copy_user_large_folio()
authorKefeng Wang <wangkefeng.wang@huawei.com>
Tue, 18 Jun 2024 09:12:41 +0000 (17:12 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 4 Jul 2024 02:30:20 +0000 (19:30 -0700)
commit530dd9926dc16220d2fae0997f45cda94f5f0864
treeb096a7c2e41f057f4ba5700bd337b75634d5607c
parent5132633ee7b46f3b62ae834539ae6ef74fd27873
mm: memory: improve copy_user_large_folio()

Use nr_pages instead of pages_per_huge_page and move the address alignment
from copy_user_large_folio() into the callers since it is only needed when
we don't know which address will be accessed.

Link: https://lkml.kernel.org/r/20240618091242.2140164-4-wangkefeng.wang@huawei.com
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: "Huang, Ying" <ying.huang@intel.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Muchun Song <muchun.song@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/hugetlb.c
mm/memory.c