diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2018-07-13 00:43:23 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2018-07-13 00:45:28 -0400 |
commit | 75c7148e0aff2184c75a52e7c4c58e46e715757b (patch) | |
tree | ce823d6a7b2a5d3057bd912d00088fc707dec08b /include/linux/kernel.h | |
parent | 17e2f2775be6e10b966cd958bc0461aab662571a (diff) |
Update bcachefs sources to 940d6ca657 bcachefs: acl code improvements
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r-- | include/linux/kernel.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index b6afea43..a4c8149e 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -222,4 +222,23 @@ static inline int __must_check kstrtos32(const char *s, unsigned int base, s32 * BUILD_BUG_ON_ZERO((perms) & 2) + \ (perms)) +/* The hash is always the low bits of hash_len */ +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ + #define HASH_LEN_DECLARE u32 hash; u32 len +#else + #define HASH_LEN_DECLARE u32 len; u32 hash +#endif + +struct qstr { + union { + struct { + HASH_LEN_DECLARE; + }; + u64 hash_len; + }; + const unsigned char *name; +}; + +#define QSTR_INIT(n,l) { { { .len = l } }, .name = n } + #endif |