[02/18] uprobes: use mm_counter_file_folio()

Message ID 20231103140119.2306578-3-wangkefeng.wang@huawei.com
State New
Headers
Series mm: convert to use folio mm counter |

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(-)
  

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);
 	}