diff options
author | Kefeng Wang <wangkefeng.wang@huawei.com> | 2023-03-02 19:58:34 +0800 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-03-28 16:20:10 -0700 |
commit | 68fa572b503ce8bfd0d0c2e5bb185134086d7d7d (patch) | |
tree | 922240718dc3415011a87a3b07c50a85641d870b /mm/memory.c | |
parent | e2bf3e2caa62f72d6a67048df440d83a12ae1a2a (diff) |
mm: memory: use folio_throttle_swaprate() in do_cow_fault()
Directly use folio_throttle_swaprate() instead of
cgroup_throttle_swaprate().
Link: https://lkml.kernel.org/r/20230302115835.105364-7-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>
Diffstat (limited to 'mm/memory.c')
-rw-r--r-- | mm/memory.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memory.c b/mm/memory.c index b6474883a6be..fdc903825981 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -4518,7 +4518,7 @@ static vm_fault_t do_cow_fault(struct vm_fault *vmf) put_page(vmf->cow_page); return VM_FAULT_OOM; } - cgroup_throttle_swaprate(vmf->cow_page, GFP_KERNEL); + folio_throttle_swaprate(page_folio(vmf->cow_page), GFP_KERNEL); ret = __do_fault(vmf); if (unlikely(ret & (VM_FAULT_ERROR | VM_FAULT_NOPAGE | VM_FAULT_RETRY))) |