X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=rbtree.h;h=7563725e51a90e37cff54e81c546ed30b151b28f;hp=20306ff1929060d726ce5f76dce9eba51f7e6b54;hb=49c34176d4130b3d4c4d90397a497b335f7ddbac;hpb=88c46b66d60db5a498487e22b32124cb6bf8576a diff --git a/rbtree.h b/rbtree.h index 20306ff1..7563725e 100644 --- a/rbtree.h +++ b/rbtree.h @@ -95,10 +95,11 @@ static inline struct page * rb_insert_page_cache(struct inode * inode, #define _LINUX_RBTREE_H #include +#include struct rb_node { - unsigned long rb_parent_color; + intptr_t rb_parent_color; #define RB_RED 0 #define RB_BLACK 1 struct rb_node *rb_right; @@ -121,7 +122,7 @@ struct rb_root static inline void rb_set_parent(struct rb_node *rb, struct rb_node *p) { - rb->rb_parent_color = (rb->rb_parent_color & 3) | (unsigned long)p; + rb->rb_parent_color = (rb->rb_parent_color & 3) | (uintptr_t)p; } static inline void rb_set_color(struct rb_node *rb, int color) { @@ -144,7 +145,7 @@ extern struct rb_node *rb_first(struct rb_root *); static inline void rb_link_node(struct rb_node * node, struct rb_node * parent, struct rb_node ** rb_link) { - node->rb_parent_color = (unsigned long )parent; + node->rb_parent_color = (uintptr_t)parent; node->rb_left = node->rb_right = NULL; *rb_link = node;