diff options
-rw-r--r-- | include/linux/radix-tree.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h index 3c2ce3cdd16a..16604454e95f 100644 --- a/include/linux/radix-tree.h +++ b/include/linux/radix-tree.h @@ -341,7 +341,7 @@ void **radix_tree_iter_retry(struct radix_tree_iter *iter) * @iter: pointer to radix tree iterator * Returns: current chunk size */ -static __always_inline unsigned +static __always_inline long radix_tree_chunk_size(struct radix_tree_iter *iter) { return iter->next_index - iter->index; @@ -375,9 +375,9 @@ radix_tree_next_slot(void **slot, struct radix_tree_iter *iter, unsigned flags) return slot + offset + 1; } } else { - unsigned size = radix_tree_chunk_size(iter) - 1; + long size = radix_tree_chunk_size(iter); - while (size--) { + while (--size > 0) { slot++; iter->index++; if (likely(*slot)) |