1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef _BCACHEFS_ENUMERATED_REF_TYPES_H 3 #define _BCACHEFS_ENUMERATED_REF_TYPES_H 4 5 #include <linux/percpu-refcount.h> 6 7 struct enumerated_ref { 8 #ifdef ENUMERATED_REF_DEBUG 9 unsigned nr; 10 bool dying; 11 atomic_long_t *refs; 12 #else 13 struct percpu_ref ref; 14 #endif 15 void (*stop_fn)(struct enumerated_ref *); 16 struct completion stop_complete; 17 }; 18 19 #endif /* _BCACHEFS_ENUMERATED_REF_TYPES_H */ 20