diff mbox series

[02/18] uprobes: use mm_counter_file_folio()

Message ID 20231103140119.2306578-3-wangkefeng.wang@huawei.com (mailing list archive)
State New
Headers show
Series mm: convert to use folio mm counter | expand

Commit Message

Kefeng Wang Nov. 3, 2023, 2:01 p.m. UTC
Use mm_counter_file_folio() to save one compound_head() call.

Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 kernel/events/uprobes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index 435aac1d8c27..e2d3c89cc524 100644
--- a/kernel/events/uprobes.c
+++ b/kernel/events/uprobes.c
@@ -188,7 +188,7 @@  static int __replace_page(struct vm_area_struct *vma, unsigned long addr,
 		dec_mm_counter(mm, MM_ANONPAGES);
 
 	if (!folio_test_anon(old_folio)) {
-		dec_mm_counter(mm, mm_counter_file(old_page));
+		dec_mm_counter(mm, mm_counter_file_folio(old_folio));
 		inc_mm_counter(mm, MM_ANONPAGES);
 	}