summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRoman Gushchin <guro@fb.com>2019-05-07 19:01:50 +0200
committerDennis Zhou <dennis@kernel.org>2019-05-09 19:51:06 +0200
commit7d9ab9b6adffd9c474c1274acb5f6208f9a09cf3 (patch)
tree461ee811d60454e5e21fb6f567ec2e2435575a12 /include
parentmd: initialize percpu refcounters using PERCU_REF_ALLOW_REINIT (diff)
downloadlinux-7d9ab9b6adffd9c474c1274acb5f6208f9a09cf3.tar.xz
linux-7d9ab9b6adffd9c474c1274acb5f6208f9a09cf3.zip
percpu_ref: release percpu memory early without PERCPU_REF_ALLOW_REINIT
Release percpu memory after finishing the switch to the atomic mode if only PERCPU_REF_ALLOW_REINIT isn't set. Signed-off-by: Roman Gushchin <guro@fb.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Dennis Zhou <dennis@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/percpu-refcount.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/percpu-refcount.h b/include/linux/percpu-refcount.h
index 0f0240af8520..7aef0abc194a 100644
--- a/include/linux/percpu-refcount.h
+++ b/include/linux/percpu-refcount.h
@@ -102,6 +102,7 @@ struct percpu_ref {
percpu_ref_func_t *release;
percpu_ref_func_t *confirm_switch;
bool force_atomic:1;
+ bool allow_reinit:1;
struct rcu_head rcu;
};