summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWu Fengguang <fengguang.wu@intel.com>2008-11-27 11:42:22 +0100
committerJiri Kosina <jkosina@suse.cz>2009-01-06 11:28:05 +0100
commit8e6bdb7f8b478323525444ecee7a1477ff5b6639 (patch)
tree02ff4e100e37a3fb8cf12b9cb321abe4ded58f36
parent2b6a2f535dda8c60721b78699618d13d6799a29e (diff)
downloadop-kernel-dev-8e6bdb7f8b478323525444ecee7a1477ff5b6639.zip
op-kernel-dev-8e6bdb7f8b478323525444ecee7a1477ff5b6639.tar.gz
trivial: radix-tree: document wrap-around issue of radix_tree_next_hole()
And some 80-line cleanups. Signed-off-by: Wu Fengguang <wfg@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r--lib/radix-tree.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/radix-tree.c b/lib/radix-tree.c
index be86b32..a7f5217 100644
--- a/lib/radix-tree.c
+++ b/lib/radix-tree.c
@@ -640,13 +640,14 @@ EXPORT_SYMBOL(radix_tree_tag_get);
*
* Returns: the index of the hole if found, otherwise returns an index
* outside of the set specified (in which case 'return - index >= max_scan'
- * will be true).
+ * will be true). In rare cases of index wrap-around, 0 will be returned.
*
* radix_tree_next_hole may be called under rcu_read_lock. However, like
- * radix_tree_gang_lookup, this will not atomically search a snapshot of the
- * tree at a single point in time. For example, if a hole is created at index
- * 5, then subsequently a hole is created at index 10, radix_tree_next_hole
- * covering both indexes may return 10 if called under rcu_read_lock.
+ * radix_tree_gang_lookup, this will not atomically search a snapshot of
+ * the tree at a single point in time. For example, if a hole is created
+ * at index 5, then subsequently a hole is created at index 10,
+ * radix_tree_next_hole covering both indexes may return 10 if called
+ * under rcu_read_lock.
*/
unsigned long radix_tree_next_hole(struct radix_tree_root *root,
unsigned long index, unsigned long max_scan)
OpenPOWER on IntegriCloud