]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - include/linux/percpu-refcount.h
Fix krealloc() alignment
[bcachefs-tools-debian] / include / linux / percpu-refcount.h
index 2bbd0979ea3cb0e5edc926d33c16e40f67c98d12..0655056446ae11634904ec7e144d75fd2aafd33c 100644 (file)
@@ -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