From 85cbe7dc97208913e526a3816ec9a2ec83eec0fd Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Wed, 7 Jun 2017 08:52:11 -0700 Subject: [PATCH] scoutfs: add a counter add macro to match inc Just a quick wrapper around the related percpu_counter call. Signed-off-by: Zach Brown --- kmod/src/counters.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kmod/src/counters.h b/kmod/src/counters.h index 0369bb4c..e5d31e5a 100644 --- a/kmod/src/counters.h +++ b/kmod/src/counters.h @@ -58,6 +58,9 @@ struct scoutfs_counters { #define scoutfs_inc_counter(sb, which) \ percpu_counter_inc(&SCOUTFS_SB(sb)->counters->which) +#define scoutfs_add_counter(sb, which, cnt) \ + percpu_counter_add(&SCOUTFS_SB(sb)->counters->which, cnt) + void __init scoutfs_init_counters(void); int scoutfs_setup_counters(struct super_block *sb); void scoutfs_destroy_counters(struct super_block *sb);