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

From: Nick Piggin
Date: Fri Jun 23 2006 - 04:40:21 EST


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.
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;
}
out: