Re: [patch 3/3] radix-tree: RCU lockless readside

Nick Piggin
2006-06-23T08:41:46Z

[-- Attachment #1: Type: text/plain, Size: 325 bytes --]

Nick Piggin wrote:

>> shift -= RADIX_TREE_MAP_SHIFT;
>> - slot = slot->slots[i];
>> + slot = rcu_dereference(slot->slots[i]);
>> + if (slot == NULL);
>> + break;
>> }
>
>
> ^^^^^^^^
>
> Up there.
>

And here's the patch.

--
SUSE Labs, Novell Inc.

[-- Attachment #2: radix-tree-paul-review-fix.patch --]
[-- Type: text/plain, Size: 376 bytes --]

Index: linux-2.6/lib/radix-tree.c
===================================================================
--- linux-2.6.orig/lib/radix-tree.c
+++ linux-2.6/lib/radix-tree.c
@@ -752,7 +752,7 @@ __lookup_tag(struct radix_tree_node *slo
}
shift -= RADIX_TREE_MAP_SHIFT;
slot = rcu_dereference(slot->slots[i]);
- if (slot == NULL);
+ if (slot == NULL)
break;
}