diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2006-02-20 05:13:31 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-02-20 05:13:31 -0500 |
commit | ff607748590fba14aecedb0d50edc4ada98d4302 (patch) | |
tree | 986e0a3abe922713069a8e8bc913043fed89a39a /lib | |
parent | db024d5398cd332023896caf70530564b15ec88e (diff) | |
parent | 6aff8f1f07a7fff48121d1ad4a550f3af24ccc81 (diff) |
Merge branch 'upstream'
Diffstat (limited to 'lib')
-rw-r--r-- | lib/radix-tree.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/radix-tree.c b/lib/radix-tree.c index c0bd4a91480..1e5b17dc7e3 100644 --- a/lib/radix-tree.c +++ b/lib/radix-tree.c @@ -752,12 +752,14 @@ void *radix_tree_delete(struct radix_tree_root *root, unsigned long index) */ nr_cleared_tags = 0; for (tag = 0; tag < RADIX_TREE_TAGS; tag++) { + tags[tag] = 1; if (tag_get(pathp->node, tag, pathp->offset)) { tag_clear(pathp->node, tag, pathp->offset); - tags[tag] = 0; - nr_cleared_tags++; - } else - tags[tag] = 1; + if (!any_tag_set(pathp->node, tag)) { + tags[tag] = 0; + nr_cleared_tags++; + } + } } for (pathp--; nr_cleared_tags && pathp->node; pathp--) { |