From: Kefeng Wang Date: Thu, 2 Mar 2023 11:58:31 +0000 (+0800) Subject: mm: memory: use folio_throttle_swaprate() in page_copy_prealloc() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=e601ded4247f959702adb5170ca8abac17a0313f;p=linux.git mm: memory: use folio_throttle_swaprate() in page_copy_prealloc() Directly use folio_throttle_swaprate() instead of cgroup_throttle_swaprate(). Link: https://lkml.kernel.org/r/20230302115835.105364-4-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton --- diff --git a/mm/memory.c b/mm/memory.c index fe15cf7c86ae4..1789c16aae734 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -970,7 +970,7 @@ static inline struct folio *page_copy_prealloc(struct mm_struct *src_mm, folio_put(new_folio); return NULL; } - cgroup_throttle_swaprate(&new_folio->page, GFP_KERNEL); + folio_throttle_swaprate(new_folio, GFP_KERNEL); return new_folio; }