summaryrefslogtreecommitdiff
path: root/mm/page-writeback.c
diff options
context:
space:
mode:
authorChi Wu <wuchi.zero@gmail.com>2021-06-29 05:35:37 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2021-06-29 20:53:47 +0300
commit87e3789749750d83aa085f04f74242087de0154b (patch)
tree1e6ba1c4c4b02f2fd86ad463b2eff74675af3585 /mm/page-writeback.c
parent0323155437870dbbae6e30fb659d7514c9f649da (diff)
downloadlinux-87e3789749750d83aa085f04f74242087de0154b.tar.xz
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 <wuchi.zero@gmail.com> Reviewed-by: Jan 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: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/page-writeback.c')
-rw-r--r--mm/page-writeback.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index d0f090d682f5..c2a849d653a9 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);
}