diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2010-05-10 05:59:37 -0400 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2010-05-10 08:20:42 -0400 |
| commit | dbb6be6d5e974c42bbecd183effaa0df69e1dd8b (patch) | |
| tree | 5735cb47e70853d057a9881dd0ce44b83e88fa63 /lib/radix-tree.c | |
| parent | 6a867a395558a7f882d041783e4cdea6744ca2bf (diff) | |
| parent | b57f95a38233a2e73b679bea4a5453a1cc2a1cc9 (diff) | |
Merge branch 'linus' into timers/core
Reason: Further posix_cpu_timer patches depend on mainline changes
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
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--; |
