Skip to contentSkip to conversation

radix-tree: remove root->height

PATCH New [email protected] 1 participant 1 message May 21, 2016 Library code

lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 135/162 radix-tree: remove root->height

From: Matthew Wilcox <[email protected]>
Subject: radix-tree: remove root->height

The only remaining references to root->height were in extend and shrink, where it was updated. Now we can remove it entirely.

Cc Konstantin Khlebnikov <[email protected]>
Cc Kirill Shutemov <[email protected]>
Cc Jan Kara <[email protected]>
Cc Neil Brown <[email protected]>

---

 include/linux/radix-tree.h |    3 
 lib/radix-tree.c           |  106 ++++++++++-------------------------
 2 files changed, 31 insertions(+), 78 deletions(-)
include/linux/radix-tree.h renamed from include/linux/radix-tree.h~radix-tree-remove-root-height +0 -3
diff -puN include/linux/radix-tree.h~radix-tree-remove-root-height include/linux/radix-tree.h
@@ -110,13 +110,11 @@ struct radix_tree_node {
 
 /* root tags are stored in gfp_mask, shifted by __GFP_BITS_SHIFT */
 struct radix_tree_root {
-	unsigned int		height;
 	gfp_t			gfp_mask;
 	struct radix_tree_node	__rcu *rnode;
 };
 
 #define RADIX_TREE_INIT(mask)	{					\
-	.height = 0,							\
 	.gfp_mask = (mask),						\
 	.rnode = NULL,							\
 }
@@ -126,7 +124,6 @@ struct radix_tree_root {
 
 #define INIT_RADIX_TREE(root, mask)					\
 do {									\
-	(root)->height = 0;						\
 	(root)->gfp_mask = (mask);					\
 	(root)->rnode = NULL;						\
 } while (0)
lib/radix-tree.c renamed from lib/radix-tree.c~radix-tree-remove-root-height +31 -73

225 lines not on this page · raw message