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 <wangkefeng.wang@huawei.com>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
Kefeng Wang 2023-03-02 19:58:31 +08:00 committed by Andrew Morton
parent 4231f84258
commit e601ded424
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}