diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/idr.h | 3 | ||||
-rw-r--r-- | include/linux/radix-tree.h | 7 |
2 files changed, 6 insertions, 4 deletions
diff --git a/include/linux/idr.h b/include/linux/idr.h index 7d6a6313f0ab..913c335054f0 100644 --- a/include/linux/idr.h +++ b/include/linux/idr.h | |||
@@ -29,7 +29,8 @@ struct idr { | |||
29 | #define IDR_FREE 0 | 29 | #define IDR_FREE 0 |
30 | 30 | ||
31 | /* Set the IDR flag and the IDR_FREE tag */ | 31 | /* Set the IDR flag and the IDR_FREE tag */ |
32 | #define IDR_RT_MARKER ((__force gfp_t)(3 << __GFP_BITS_SHIFT)) | 32 | #define IDR_RT_MARKER (ROOT_IS_IDR | (__force gfp_t) \ |
33 | (1 << (ROOT_TAG_SHIFT + IDR_FREE))) | ||
33 | 34 | ||
34 | #define IDR_INIT_BASE(base) { \ | 35 | #define IDR_INIT_BASE(base) { \ |
35 | .idr_rt = RADIX_TREE_INIT(IDR_RT_MARKER), \ | 36 | .idr_rt = RADIX_TREE_INIT(IDR_RT_MARKER), \ |
diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h index fc55ff31eca7..6c4e2e716dac 100644 --- a/include/linux/radix-tree.h +++ b/include/linux/radix-tree.h | |||
@@ -104,9 +104,10 @@ struct radix_tree_node { | |||
104 | unsigned long tags[RADIX_TREE_MAX_TAGS][RADIX_TREE_TAG_LONGS]; | 104 | unsigned long tags[RADIX_TREE_MAX_TAGS][RADIX_TREE_TAG_LONGS]; |
105 | }; | 105 | }; |
106 | 106 | ||
107 | /* The top bits of gfp_mask are used to store the root tags and the IDR flag */ | 107 | /* The IDR tag is stored in the low bits of the GFP flags */ |
108 | #define ROOT_IS_IDR ((__force gfp_t)(1 << __GFP_BITS_SHIFT)) | 108 | #define ROOT_IS_IDR ((__force gfp_t)4) |
109 | #define ROOT_TAG_SHIFT (__GFP_BITS_SHIFT + 1) | 109 | /* The top bits of gfp_mask are used to store the root tags */ |
110 | #define ROOT_TAG_SHIFT (__GFP_BITS_SHIFT) | ||
110 | 111 | ||
111 | struct radix_tree_root { | 112 | struct radix_tree_root { |
112 | gfp_t gfp_mask; | 113 | gfp_t gfp_mask; |