summaryrefslogtreecommitdiffstats
path: root/lib/radix-tree.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-04-13 00:28:45 -0700
committerDavid S. Miller <davem@davemloft.net>2010-04-13 00:28:45 -0700
commit9343af084c7e8911897b0883042ee690cee3aaef (patch)
tree6211a4bdc84690bec6530d27a3abb19f5e8bb8f3 /lib/radix-tree.c
parente182c77cc291456eed127b1472952ddb59a81a9d (diff)
parent0d0fb0f9c5fddef4a10242fe3337f00f528a3099 (diff)
downloadop-kernel-dev-9343af084c7e8911897b0883042ee690cee3aaef.zip
op-kernel-dev-9343af084c7e8911897b0883042ee690cee3aaef.tar.gz
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Conflicts: lib/Kconfig.debug
Diffstat (limited to 'lib/radix-tree.c')
-rw-r--r--lib/radix-tree.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/radix-tree.c b/lib/radix-tree.c
index 6b9670d..2a087e0 100644
--- a/lib/radix-tree.c
+++ b/lib/radix-tree.c
@@ -28,7 +28,6 @@
#include <linux/slab.h>
#include <linux/notifier.h>
#include <linux/cpu.h>
-#include <linux/gfp.h>
#include <linux/string.h>
#include <linux/bitops.h>
#include <linux/rcupdate.h>
@@ -556,6 +555,10 @@ EXPORT_SYMBOL(radix_tree_tag_clear);
*
* 0: tag not present or not set
* 1: tag set
+ *
+ * Note that the return value of this function may not be relied on, even if
+ * the RCU lock is held, unless tag modification and node deletion are excluded
+ * from concurrency.
*/
int radix_tree_tag_get(struct radix_tree_root *root,
unsigned long index, unsigned int tag)
@@ -596,12 +599,8 @@ int radix_tree_tag_get(struct radix_tree_root *root,
*/
if (!tag_get(node, tag, offset))
saw_unset_tag = 1;
- if (height == 1) {
- int ret = tag_get(node, tag, offset);
-
- BUG_ON(ret && saw_unset_tag);
- return !!ret;
- }
+ if (height == 1)
+ return !!tag_get(node, tag, offset);
node = rcu_dereference_raw(node->slots[offset]);
shift -= RADIX_TREE_MAP_SHIFT;
height--;
OpenPOWER on IntegriCloud