diff options
| author | Patrick McHardy <kaber@trash.net> | 2010-04-20 10:02:01 -0400 |
|---|---|---|
| committer | Patrick McHardy <kaber@trash.net> | 2010-04-20 10:02:01 -0400 |
| commit | 62910554656cdcd6b6f84a5154c4155aae4ca231 (patch) | |
| tree | dcf14004f6fd2ef7154362ff948bfeba0f3ea92d /lib/radix-tree.c | |
| parent | 22265a5c3c103cf8c50be62e6c90d045eb649e6d (diff) | |
| parent | ab9304717f7624c41927f442e6b6d418b2d8b3e4 (diff) | |
Merge branch 'master' of /repos/git/net-next-2.6
Conflicts:
Documentation/feature-removal-schedule.txt
net/ipv6/netfilter/ip6t_REJECT.c
net/netfilter/xt_limit.c
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'lib/radix-tree.c')
| -rw-r--r-- | lib/radix-tree.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/radix-tree.c b/lib/radix-tree.c index 6b9670d6bbf9..2a087e0f9863 100644 --- a/lib/radix-tree.c +++ b/lib/radix-tree.c | |||
| @@ -28,7 +28,6 @@ | |||
| 28 | #include <linux/slab.h> | 28 | #include <linux/slab.h> |
| 29 | #include <linux/notifier.h> | 29 | #include <linux/notifier.h> |
| 30 | #include <linux/cpu.h> | 30 | #include <linux/cpu.h> |
| 31 | #include <linux/gfp.h> | ||
| 32 | #include <linux/string.h> | 31 | #include <linux/string.h> |
| 33 | #include <linux/bitops.h> | 32 | #include <linux/bitops.h> |
| 34 | #include <linux/rcupdate.h> | 33 | #include <linux/rcupdate.h> |
| @@ -556,6 +555,10 @@ EXPORT_SYMBOL(radix_tree_tag_clear); | |||
| 556 | * | 555 | * |
| 557 | * 0: tag not present or not set | 556 | * 0: tag not present or not set |
| 558 | * 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. | ||
| 559 | */ | 562 | */ |
| 560 | int radix_tree_tag_get(struct radix_tree_root *root, | 563 | int radix_tree_tag_get(struct radix_tree_root *root, |
| 561 | unsigned long index, unsigned int tag) | 564 | unsigned long index, unsigned int tag) |
| @@ -596,12 +599,8 @@ int radix_tree_tag_get(struct radix_tree_root *root, | |||
| 596 | */ | 599 | */ |
| 597 | if (!tag_get(node, tag, offset)) | 600 | if (!tag_get(node, tag, offset)) |
| 598 | saw_unset_tag = 1; | 601 | saw_unset_tag = 1; |
| 599 | if (height == 1) { | 602 | if (height == 1) |
| 600 | int ret = tag_get(node, tag, offset); | 603 | return !!tag_get(node, tag, offset); |
| 601 | |||
| 602 | BUG_ON(ret && saw_unset_tag); | ||
| 603 | return !!ret; | ||
| 604 | } | ||
| 605 | node = rcu_dereference_raw(node->slots[offset]); | 604 | node = rcu_dereference_raw(node->slots[offset]); |
| 606 | shift -= RADIX_TREE_MAP_SHIFT; | 605 | shift -= RADIX_TREE_MAP_SHIFT; |
| 607 | height--; | 606 | height--; |
