summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2017-03-16 14:23:40 -0800
committerKent Overstreet <kent.overstreet@gmail.com>2017-03-16 14:23:40 -0800
commitac296ad4dcd32a4e7618716782fc3f2b69d03a74 (patch)
treeeec1860a76900daae851bfcb51cccdc71885f173 /include
parentd4e6736e59c96c2e982f3d92f561b8fca64d3dec (diff)
fix percpu_ref_reinit()
Diffstat (limited to 'include')
-rw-r--r--include/linux/percpu-refcount.h18
1 files changed, 5 insertions, 13 deletions
diff --git a/include/linux/percpu-refcount.h b/include/linux/percpu-refcount.h
index 2bbd0979..06550564 100644
--- a/include/linux/percpu-refcount.h
+++ b/include/linux/percpu-refcount.h
@@ -19,12 +19,6 @@ enum {
/* @flags for percpu_ref_init() */
enum {
- /*
- * Start w/ ref == 1 in atomic mode. Can be switched to percpu
- * operation using percpu_ref_switch_to_percpu(). If initialized
- * with this flag, the ref will stay in atomic mode until
- * percpu_ref_switch_to_percpu() is invoked on it.
- */
PERCPU_REF_INIT_ATOMIC = 1 << 0,
/*
@@ -57,13 +51,6 @@ static inline int __must_check percpu_ref_init(struct percpu_ref *ref,
return 0;
}
-static inline void percpu_ref_switch_to_atomic(struct percpu_ref *ref,
- percpu_ref_func_t *confirm_switch) {}
-
-static inline void percpu_ref_switch_to_percpu(struct percpu_ref *ref) {}
-
-static inline void percpu_ref_reinit(struct percpu_ref *ref) {}
-
/**
* percpu_ref_get_many - increment a percpu refcount
* @ref: percpu_ref to get
@@ -155,6 +142,11 @@ static inline void percpu_ref_put(struct percpu_ref *ref)
percpu_ref_put_many(ref, 1);
}
+static inline void percpu_ref_reinit(struct percpu_ref *ref)
+{
+ percpu_ref_get(ref);
+}
+
/**
* percpu_ref_kill - drop the initial ref
* @ref: percpu_ref to kill