aboutsummaryrefslogtreecommitdiffstats
path: root/lib/radix-tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/radix-tree.c')
-rw-r--r--lib/radix-tree.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/radix-tree.c b/lib/radix-tree.c
index 0871582aa29d..2a087e0f9863 100644
--- a/lib/radix-tree.c
+++ b/lib/radix-tree.c
@@ -555,6 +555,10 @@ EXPORT_SYMBOL(radix_tree_tag_clear);
555 * 555 *
556 * 0: tag not present or not set 556 * 0: tag not present or not set
557 * 1: tag set 557 * 1: tag set
558 *
559 * Note that the return value of this function may not be relied on, even if
560 * the RCU lock is held, unless tag modification and node deletion are excluded
561 * from concurrency.
558 */ 562 */
559int radix_tree_tag_get(struct radix_tree_root *root, 563int radix_tree_tag_get(struct radix_tree_root *root,
560 unsigned long index, unsigned int tag) 564 unsigned long index, unsigned int tag)
@@ -595,12 +599,8 @@ int radix_tree_tag_get(struct radix_tree_root *root,
595 */ 599 */
596 if (!tag_get(node, tag, offset)) 600 if (!tag_get(node, tag, offset))
597 saw_unset_tag = 1; 601 saw_unset_tag = 1;
598 if (height == 1) { 602 if (height == 1)
599 int ret = tag_get(node, tag, offset); 603 return !!tag_get(node, tag, offset);
600
601 BUG_ON(ret && saw_unset_tag);
602 return !!ret;
603 }
604 node = rcu_dereference_raw(node->slots[offset]); 604 node = rcu_dereference_raw(node->slots[offset]);
605 shift -= RADIX_TREE_MAP_SHIFT; 605 shift -= RADIX_TREE_MAP_SHIFT;
606 height--; 606 height--;