Skip to content

Commit

Permalink
trivial: radix-tree: document wrap-around issue of radix_tree_next_ho…
Browse files Browse the repository at this point in the history
…le()

And some 80-line cleanups.

Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Wu Fengguang authored and Jiri Kosina committed Jan 6, 2009
1 parent 2b6a2f5 commit 8e6bdb7
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/radix-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8e6bdb7

Please sign in to comment.