diff options
Diffstat (limited to 'include/linux/dcache.h')
-rw-r--r-- | include/linux/dcache.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 8239f64d1c2e..094789ff3e9f 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -25,6 +25,13 @@ struct vfsmount; | |||
25 | 25 | ||
26 | #define IS_ROOT(x) ((x) == (x)->d_parent) | 26 | #define IS_ROOT(x) ((x) == (x)->d_parent) |
27 | 27 | ||
28 | /* The hash is always the low bits of hash_len */ | ||
29 | #ifdef __LITTLE_ENDIAN | ||
30 | #define HASH_LEN_DECLARE u32 hash; u32 len; | ||
31 | #else | ||
32 | #define HASH_LEN_DECLARE u32 len; u32 hash; | ||
33 | #endif | ||
34 | |||
28 | /* | 35 | /* |
29 | * "quick string" -- eases parameter passing, but more importantly | 36 | * "quick string" -- eases parameter passing, but more importantly |
30 | * saves "metadata" about the string (ie length and the hash). | 37 | * saves "metadata" about the string (ie length and the hash). |
@@ -33,11 +40,19 @@ struct vfsmount; | |||
33 | * dentry. | 40 | * dentry. |
34 | */ | 41 | */ |
35 | struct qstr { | 42 | struct qstr { |
36 | unsigned int hash; | 43 | union { |
37 | unsigned int len; | 44 | struct { |
45 | HASH_LEN_DECLARE; | ||
46 | }; | ||
47 | u64 hash_len; | ||
48 | }; | ||
38 | const unsigned char *name; | 49 | const unsigned char *name; |
39 | }; | 50 | }; |
40 | 51 | ||
52 | #define QSTR_INIT(n,l) { { { .len = l } }, .name = n } | ||
53 | #define hashlen_hash(hashlen) ((u32) (hashlen)) | ||
54 | #define hashlen_len(hashlen) ((u32)((hashlen) >> 32)) | ||
55 | |||
41 | struct dentry_stat_t { | 56 | struct dentry_stat_t { |
42 | int nr_dentry; | 57 | int nr_dentry; |
43 | int nr_unused; | 58 | int nr_unused; |