Skip to content

Commit

Permalink
radix-tree: __rcu annotations
Browse files Browse the repository at this point in the history
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Nick Piggin <npiggin@suse.de>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
  • Loading branch information
Arnd Bergmann authored and Paul E. McKenney committed Aug 20, 2010
1 parent 374a8e0 commit a111557
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion include/linux/radix-tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ static inline void *radix_tree_indirect_to_ptr(void *ptr)
{
return (void *)((unsigned long)ptr & ~RADIX_TREE_INDIRECT_PTR);
}
#define radix_tree_indirect_to_ptr(ptr) \
radix_tree_indirect_to_ptr((void __force *)(ptr))

static inline int radix_tree_is_indirect_ptr(void *ptr)
{
Expand All @@ -61,7 +63,7 @@ static inline int radix_tree_is_indirect_ptr(void *ptr)
struct radix_tree_root {
unsigned int height;
gfp_t gfp_mask;
struct radix_tree_node *rnode;
struct radix_tree_node __rcu *rnode;
};

#define RADIX_TREE_INIT(mask) { \
Expand Down
2 changes: 1 addition & 1 deletion lib/radix-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ struct radix_tree_node {
unsigned int height; /* Height from the bottom */
unsigned int count;
struct rcu_head rcu_head;
void *slots[RADIX_TREE_MAP_SIZE];
void __rcu *slots[RADIX_TREE_MAP_SIZE];
unsigned long tags[RADIX_TREE_MAX_TAGS][RADIX_TREE_TAG_LONGS];
};

Expand Down

0 comments on commit a111557

Please sign in to comment.