summaryrefslogtreecommitdiff
path: root/include/linux/kernel.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-04-26 16:34:57 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-05-02 00:41:47 -0400
commit6b1f79d5df9f2735192ed1a40c711cf131d4f43e (patch)
tree67f007fabd01964145cac4f273902f1c12927e8b /include/linux/kernel.h
parentc1a8e27a3fad202750a1b66a1fd1fa82a8a5bd92 (diff)
Update bcachefs sources to 6a20aede29 bcachefs: Fix quotas + snapshotsv0.29
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r--include/linux/kernel.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index a55b8a9b..01466c40 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -96,6 +96,14 @@
(type *)((char *)__mptr - offsetof(type, member)); })
#endif
+#define __struct_group(TAG, NAME, ATTRS, MEMBERS...) \
+ union { \
+ struct { MEMBERS } ATTRS; \
+ struct TAG { MEMBERS } ATTRS NAME; \
+ }
+#define struct_group(NAME, MEMBERS...) \
+ __struct_group(/* no tag */, NAME, /* no attrs */, MEMBERS)
+
#define max(x, y) ({ \
typeof(x) _max1 = (x); \
typeof(y) _max2 = (y); \