@@ -260,11 +260,11 @@ static void dump_node(struct radix_tree_node *node, unsigned long index)
260
260
{
261
261
unsigned long i ;
262
262
263
- pr_debug ("radix node: %p offset %d indices %lu-%lu parent %p tags %lx %lx %lx shift %d count %d exceptional %d\n" ,
263
+ pr_debug ("radix node: %p offset %d indices %lu-%lu parent %p tags %lx %lx %lx shift %d count %d nr_values %d\n" ,
264
264
node , node -> offset , index , index | node_maxindex (node ),
265
265
node -> parent ,
266
266
node -> tags [0 ][0 ], node -> tags [1 ][0 ], node -> tags [2 ][0 ],
267
- node -> shift , node -> count , node -> exceptional );
267
+ node -> shift , node -> count , node -> nr_values );
268
268
269
269
for (i = 0 ; i < RADIX_TREE_MAP_SIZE ; i ++ ) {
270
270
unsigned long first = index | (i << node -> shift );
@@ -354,7 +354,7 @@ static struct radix_tree_node *
354
354
radix_tree_node_alloc (gfp_t gfp_mask , struct radix_tree_node * parent ,
355
355
struct radix_tree_root * root ,
356
356
unsigned int shift , unsigned int offset ,
357
- unsigned int count , unsigned int exceptional )
357
+ unsigned int count , unsigned int nr_values )
358
358
{
359
359
struct radix_tree_node * ret = NULL ;
360
360
@@ -401,9 +401,9 @@ radix_tree_node_alloc(gfp_t gfp_mask, struct radix_tree_node *parent,
401
401
ret -> shift = shift ;
402
402
ret -> offset = offset ;
403
403
ret -> count = count ;
404
- ret -> exceptional = exceptional ;
404
+ ret -> nr_values = nr_values ;
405
405
ret -> parent = parent ;
406
- ret -> root = root ;
406
+ ret -> array = root ;
407
407
}
408
408
return ret ;
409
409
}
@@ -633,8 +633,8 @@ static int radix_tree_extend(struct radix_tree_root *root, gfp_t gfp,
633
633
if (radix_tree_is_internal_node (entry )) {
634
634
entry_to_node (entry )-> parent = node ;
635
635
} else if (xa_is_value (entry )) {
636
- /* Moving an exceptional root->xa_head to a node */
637
- node -> exceptional = 1 ;
636
+ /* Moving a value entry root->xa_head to a node */
637
+ node -> nr_values = 1 ;
638
638
}
639
639
/*
640
640
* entry was already in the radix tree, so we do not need
@@ -928,12 +928,12 @@ static inline int insert_entries(struct radix_tree_node *node,
928
928
if (xa_is_node (old ))
929
929
radix_tree_free_nodes (old );
930
930
if (xa_is_value (old ))
931
- node -> exceptional -- ;
931
+ node -> nr_values -- ;
932
932
}
933
933
if (node ) {
934
934
node -> count += n ;
935
935
if (xa_is_value (item ))
936
- node -> exceptional += n ;
936
+ node -> nr_values += n ;
937
937
}
938
938
return n ;
939
939
}
@@ -947,7 +947,7 @@ static inline int insert_entries(struct radix_tree_node *node,
947
947
if (node ) {
948
948
node -> count ++ ;
949
949
if (xa_is_value (item ))
950
- node -> exceptional ++ ;
950
+ node -> nr_values ++ ;
951
951
}
952
952
return 1 ;
953
953
}
@@ -1083,7 +1083,7 @@ void *radix_tree_lookup(const struct radix_tree_root *root, unsigned long index)
1083
1083
EXPORT_SYMBOL (radix_tree_lookup );
1084
1084
1085
1085
static inline void replace_sibling_entries (struct radix_tree_node * node ,
1086
- void __rcu * * slot , int count , int exceptional )
1086
+ void __rcu * * slot , int count , int values )
1087
1087
{
1088
1088
#ifdef CONFIG_RADIX_TREE_MULTIORDER
1089
1089
unsigned offset = get_slot_offset (node , slot );
@@ -1096,18 +1096,18 @@ static inline void replace_sibling_entries(struct radix_tree_node *node,
1096
1096
node -> slots [offset ] = NULL ;
1097
1097
node -> count -- ;
1098
1098
}
1099
- node -> exceptional += exceptional ;
1099
+ node -> nr_values += values ;
1100
1100
}
1101
1101
#endif
1102
1102
}
1103
1103
1104
1104
static void replace_slot (void __rcu * * slot , void * item ,
1105
- struct radix_tree_node * node , int count , int exceptional )
1105
+ struct radix_tree_node * node , int count , int values )
1106
1106
{
1107
- if (node && (count || exceptional )) {
1107
+ if (node && (count || values )) {
1108
1108
node -> count += count ;
1109
- node -> exceptional += exceptional ;
1110
- replace_sibling_entries (node , slot , count , exceptional );
1109
+ node -> nr_values += values ;
1110
+ replace_sibling_entries (node , slot , count , values );
1111
1111
}
1112
1112
1113
1113
rcu_assign_pointer (* slot , item );
@@ -1161,17 +1161,17 @@ void __radix_tree_replace(struct radix_tree_root *root,
1161
1161
radix_tree_update_node_t update_node )
1162
1162
{
1163
1163
void * old = rcu_dereference_raw (* slot );
1164
- int exceptional = !!xa_is_value (item ) - !!xa_is_value (old );
1164
+ int values = !!xa_is_value (item ) - !!xa_is_value (old );
1165
1165
int count = calculate_count (root , node , slot , item , old );
1166
1166
1167
1167
/*
1168
- * This function supports replacing exceptional entries and
1168
+ * This function supports replacing value entries and
1169
1169
* deleting entries, but that needs accounting against the
1170
1170
* node unless the slot is root->xa_head.
1171
1171
*/
1172
1172
WARN_ON_ONCE (!node && (slot != (void __rcu * * )& root -> xa_head ) &&
1173
- (count || exceptional ));
1174
- replace_slot (slot , item , node , count , exceptional );
1173
+ (count || values ));
1174
+ replace_slot (slot , item , node , count , values );
1175
1175
1176
1176
if (!node )
1177
1177
return ;
@@ -1193,7 +1193,7 @@ void __radix_tree_replace(struct radix_tree_root *root,
1193
1193
* across slot lookup and replacement.
1194
1194
*
1195
1195
* NOTE: This cannot be used to switch between non-entries (empty slots),
1196
- * regular entries, and exceptional entries, as that requires accounting
1196
+ * regular entries, and value entries, as that requires accounting
1197
1197
* inside the radix tree node. When switching from one type of entry or
1198
1198
* deleting, use __radix_tree_lookup() and __radix_tree_replace() or
1199
1199
* radix_tree_iter_replace().
@@ -1301,7 +1301,7 @@ int radix_tree_split(struct radix_tree_root *root, unsigned long index,
1301
1301
rcu_assign_pointer (parent -> slots [end ], RADIX_TREE_RETRY );
1302
1302
}
1303
1303
rcu_assign_pointer (parent -> slots [offset ], RADIX_TREE_RETRY );
1304
- parent -> exceptional -= (end - offset );
1304
+ parent -> nr_values -= (end - offset );
1305
1305
1306
1306
if (order == parent -> shift )
1307
1307
return 0 ;
@@ -1961,7 +1961,7 @@ static bool __radix_tree_delete(struct radix_tree_root *root,
1961
1961
struct radix_tree_node * node , void __rcu * * slot )
1962
1962
{
1963
1963
void * old = rcu_dereference_raw (* slot );
1964
- int exceptional = xa_is_value (old ) ? -1 : 0 ;
1964
+ int values = xa_is_value (old ) ? -1 : 0 ;
1965
1965
unsigned offset = get_slot_offset (node , slot );
1966
1966
int tag ;
1967
1967
@@ -1971,7 +1971,7 @@ static bool __radix_tree_delete(struct radix_tree_root *root,
1971
1971
for (tag = 0 ; tag < RADIX_TREE_MAX_TAGS ; tag ++ )
1972
1972
node_tag_clear (root , node , tag , offset );
1973
1973
1974
- replace_slot (slot , NULL , node , -1 , exceptional );
1974
+ replace_slot (slot , NULL , node , -1 , values );
1975
1975
return node && delete_node (root , node , NULL );
1976
1976
}
1977
1977
0 commit comments