diff options
author | Kefeng Wang <wangkefeng.wang@huawei.com> | 2023-03-02 12:58:35 +0100 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-03-29 01:20:10 +0200 |
commit | 3e4fb13ac34bad94cf390415b1e6bc3ca9520d65 (patch) | |
tree | 98d7b9101589c0e09fd035677ded4383527e4449 /mm/swapfile.c | |
parent | mm: memory: use folio_throttle_swaprate() in do_cow_fault() (diff) | |
download | linux-3e4fb13ac34bad94cf390415b1e6bc3ca9520d65.tar.xz linux-3e4fb13ac34bad94cf390415b1e6bc3ca9520d65.zip |
mm: swap: remove unneeded cgroup_throttle_swaprate()
All the callers of cgroup_throttle_swaprate() are converted to
folio_throttle_swaprate(), so make __cgroup_throttle_swaprate() to take a
folio, and rename it to __folio_throttle_swaprate(), also rename gfp_mask
to gfp and drop redundant extern keyword. finally, drop unused
cgroup_throttle_swaprate().
Link: https://lkml.kernel.org/r/20230302115835.105364-8-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/swapfile.c')
-rw-r--r-- | mm/swapfile.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/swapfile.c b/mm/swapfile.c index 62ba2bf577d7..c1b97436f811 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -3635,12 +3635,12 @@ static void free_swap_count_continuations(struct swap_info_struct *si) } #if defined(CONFIG_MEMCG) && defined(CONFIG_BLK_CGROUP) -void __cgroup_throttle_swaprate(struct page *page, gfp_t gfp_mask) +void __folio_throttle_swaprate(struct folio *folio, gfp_t gfp) { struct swap_info_struct *si, *next; - int nid = page_to_nid(page); + int nid = folio_nid(folio); - if (!(gfp_mask & __GFP_IO)) + if (!(gfp & __GFP_IO)) return; if (!blk_cgroup_congested()) |