summaryrefslogtreecommitdiff
path: root/include/linux/radix-tree.h
diff options
context:
space:
mode:
authorMatthew Wilcox <willy@infradead.org>2017-11-04 06:09:45 +0300
committerMatthew Wilcox <willy@infradead.org>2018-09-30 05:47:49 +0300
commit02c02bf12c5d838603eed44195d3e91f094e2ab2 (patch)
treecd7ab986f4b11b330f59d04f0bb9f618efb579fc /include/linux/radix-tree.h
parent3159f943aafdbacb2f94c38fdaadabf2bbde2a14 (diff)
downloadlinux-02c02bf12c5d838603eed44195d3e91f094e2ab2.tar.xz
xarray: Change definition of sibling entries
Instead of storing a pointer to the slot containing the canonical entry, store the offset of the slot. Produces slightly more efficient code (~300 bytes) and simplifies the implementation. Signed-off-by: Matthew Wilcox <willy@infradead.org> Reviewed-by: Josef Bacik <jbacik@fb.com>
Diffstat (limited to 'include/linux/radix-tree.h')
-rw-r--r--include/linux/radix-tree.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h
index e9e76ab4fbbf..60f3d8eb2cb7 100644
--- a/include/linux/radix-tree.h
+++ b/include/linux/radix-tree.h
@@ -59,10 +59,7 @@ static inline bool radix_tree_is_internal_node(void *ptr)
#define RADIX_TREE_MAX_TAGS 3
-#ifndef RADIX_TREE_MAP_SHIFT
-#define RADIX_TREE_MAP_SHIFT (CONFIG_BASE_SMALL ? 4 : 6)
-#endif
-
+#define RADIX_TREE_MAP_SHIFT XA_CHUNK_SHIFT
#define RADIX_TREE_MAP_SIZE (1UL << RADIX_TREE_MAP_SHIFT)
#define RADIX_TREE_MAP_MASK (RADIX_TREE_MAP_SIZE-1)