Commit 87e37897 authored by Chi Wu's avatar Chi Wu Committed by Linus Torvalds

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.comSigned-off-by: default avatarChi Wu <wuchi.zero@gmail.com>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Cc: Howard Cochran <hcochran@kernelspring.com>
Cc: Miklos Szeredi <mszeredi@redhat.com>
Cc: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 03231554
...@@ -2445,7 +2445,7 @@ void account_page_dirtied(struct page *page, struct address_space *mapping) ...@@ -2445,7 +2445,7 @@ void account_page_dirtied(struct page *page, struct address_space *mapping)
inc_wb_stat(wb, WB_DIRTIED); inc_wb_stat(wb, WB_DIRTIED);
task_io_account_write(PAGE_SIZE); task_io_account_write(PAGE_SIZE);
current->nr_dirtied++; current->nr_dirtied++;
this_cpu_inc(bdp_ratelimits); __this_cpu_inc(bdp_ratelimits);
mem_cgroup_track_foreign_dirty(page, wb); mem_cgroup_track_foreign_dirty(page, wb);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment