From: Chi Wu Date: Tue, 29 Jun 2021 02:35:37 +0000 (-0700) Subject: mm/page-writeback: use __this_cpu_inc() in account_page_dirtied() X-Git-Tag: v5.15~864^2~146 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=87e3789749750d83aa085f04f74242087de0154b;p=platform%2Fkernel%2Flinux-starfive.git mm/page-writeback: use __this_cpu_inc() in account_page_dirtied() As account_page_dirtied() was always protected by xa_lock_irqsave(), so using __this_cpu_inc() is better. Link: https://lkml.kernel.org/r/20210512144742.4764-1-wuchi.zero@gmail.com Signed-off-by: Chi Wu Reviewed-by: Jan Kara Cc: Howard Cochran Cc: Miklos Szeredi Cc: Sedat Dilek Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/page-writeback.c b/mm/page-writeback.c index d0f090d..c2a849d 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -2445,7 +2445,7 @@ void account_page_dirtied(struct page *page, struct address_space *mapping) inc_wb_stat(wb, WB_DIRTIED); task_io_account_write(PAGE_SIZE); current->nr_dirtied++; - this_cpu_inc(bdp_ratelimits); + __this_cpu_inc(bdp_ratelimits); mem_cgroup_track_foreign_dirty(page, wb); }