@@ -96,7 +96,6 @@ static inline bool radix_tree_empty(const struct radix_tree_root *root)
9696 * @next_index: one beyond the last index for this chunk
9797 * @tags: bit-mask for tag-iterating
9898 * @node: node that contains current slot
99- * @shift: shift for the node that holds our slots
10099 *
101100 * This radix tree iterator works in terms of "chunks" of slots. A chunk is a
102101 * subinterval of slots contained within one radix tree leaf node. It is
@@ -110,20 +109,8 @@ struct radix_tree_iter {
110109 unsigned long next_index ;
111110 unsigned long tags ;
112111 struct radix_tree_node * node ;
113- #ifdef CONFIG_RADIX_TREE_MULTIORDER
114- unsigned int shift ;
115- #endif
116112};
117113
118- static inline unsigned int iter_shift (const struct radix_tree_iter * iter )
119- {
120- #ifdef CONFIG_RADIX_TREE_MULTIORDER
121- return iter -> shift ;
122- #else
123- return 0 ;
124- #endif
125- }
126-
127114/**
128115 * Radix-tree synchronization
129116 *
@@ -230,13 +217,8 @@ static inline int radix_tree_exception(void *arg)
230217 return unlikely ((unsigned long )arg & RADIX_TREE_ENTRY_MASK );
231218}
232219
233- int __radix_tree_insert (struct radix_tree_root * , unsigned long index ,
234- unsigned order , void * );
235- static inline int radix_tree_insert (struct radix_tree_root * root ,
236- unsigned long index , void * entry )
237- {
238- return __radix_tree_insert (root , index , 0 , entry );
239- }
220+ int radix_tree_insert (struct radix_tree_root * , unsigned long index ,
221+ void * );
240222void * __radix_tree_lookup (const struct radix_tree_root * , unsigned long index ,
241223 struct radix_tree_node * * nodep , void __rcu * * * slotp );
242224void * radix_tree_lookup (const struct radix_tree_root * , unsigned long );
@@ -384,7 +366,7 @@ void __rcu **radix_tree_iter_retry(struct radix_tree_iter *iter)
384366static inline unsigned long
385367__radix_tree_iter_add (struct radix_tree_iter * iter , unsigned long slots )
386368{
387- return iter -> index + ( slots << iter_shift ( iter )) ;
369+ return iter -> index + slots ;
388370}
389371
390372/**
@@ -409,20 +391,8 @@ void __rcu **__must_check radix_tree_iter_resume(void __rcu **slot,
409391static __always_inline long
410392radix_tree_chunk_size (struct radix_tree_iter * iter )
411393{
412- return (iter -> next_index - iter -> index ) >> iter_shift (iter );
413- }
414-
415- #ifdef CONFIG_RADIX_TREE_MULTIORDER
416- void __rcu * * __radix_tree_next_slot (void __rcu * * slot ,
417- struct radix_tree_iter * iter , unsigned flags );
418- #else
419- /* Can't happen without sibling entries, but the compiler can't tell that */
420- static inline void __rcu * * __radix_tree_next_slot (void __rcu * * slot ,
421- struct radix_tree_iter * iter , unsigned flags )
422- {
423- return slot ;
394+ return iter -> next_index - iter -> index ;
424395}
425- #endif
426396
427397/**
428398 * radix_tree_next_slot - find next slot in chunk
@@ -482,8 +452,6 @@ static __always_inline void __rcu **radix_tree_next_slot(void __rcu **slot,
482452 return NULL ;
483453
484454 found :
485- if (unlikely (radix_tree_is_internal_node (rcu_dereference_raw (* slot ))))
486- return __radix_tree_next_slot (slot , iter , flags );
487455 return slot ;
488456}
489457
0 commit comments