Add a variant of rcuref that operates on atomic_long_t instead of atomic_t so it can be used for data structures that require atomic_long_t. Signed-off-by: Christian Brauner <brauner@xxxxxxxxxx> --- include/linux/types.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/linux/types.h b/include/linux/types.h index 2bc8766ba20cab014a380f02e5644bd0d772ec67..b10bf351f3e4d1f1c1ca16248199470306de4aa0 100644 --- a/include/linux/types.h +++ b/include/linux/types.h @@ -190,6 +190,16 @@ typedef struct { #define RCUREF_INIT(i) { .refcnt = ATOMIC_INIT(i - 1) } +typedef struct { +#ifdef CONFIG_64BIT + atomic64_t refcnt; +#else + atomic_t refcnt; +#endif +} rcuref_long_t; + +#define RCUREF_LONG_INIT(i) { .refcnt = ATOMIC_LONG_INIT(i - 1) } + struct list_head { struct list_head *next, *prev; }; -- 2.45.2