diff options
author | David Woodhouse <dwmw2@infradead.org> | 2006-04-21 13:15:17 +0100 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-04-21 13:15:17 +0100 |
commit | 3db3a445308b3cee9bbbd8baa6d05081c9532da0 (patch) | |
tree | 768e3a190df58b0f5f5d4a5c5ade925649e757dd /block/cfq-iosched.c | |
parent | 7fe1e133bf45b0fe70491ed3d4c5b491feff7aa8 (diff) | |
download | blackbird-op-linux-3db3a445308b3cee9bbbd8baa6d05081c9532da0.tar.gz blackbird-op-linux-3db3a445308b3cee9bbbd8baa6d05081c9532da0.zip |
[RBTREE] Change rbtree off-tree marking in I/O schedulers.
They were abusing the rb_color field to mark nodes which weren't currently
on the tree. Fix that to use the same method as eventpoll did -- setting
the parent pointer to point back to itself. And use the appropriate
accessor macros for setting and reading the parent.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'block/cfq-iosched.c')
-rw-r--r-- | block/cfq-iosched.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 2540dfaa3e38..01c416ba8437 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -60,14 +60,9 @@ static DEFINE_RWLOCK(cfq_exit_lock); /* * rb-tree defines */ -#define RB_NONE (2) #define RB_EMPTY(node) ((node)->rb_node == NULL) -#define RB_CLEAR_COLOR(node) (node)->rb_color = RB_NONE #define RB_CLEAR(node) do { \ - (node)->rb_parent = NULL; \ - RB_CLEAR_COLOR((node)); \ - (node)->rb_right = NULL; \ - (node)->rb_left = NULL; \ + memset(node, 0, sizeof(*node)); \ } while (0) #define RB_CLEAR_ROOT(root) ((root)->rb_node = NULL) #define rb_entry_crq(node) rb_entry((node), struct cfq_rq, rb_node) @@ -563,7 +558,6 @@ static inline void cfq_del_crq_rb(struct cfq_rq *crq) cfq_update_next_crq(crq); rb_erase(&crq->rb_node, &cfqq->sort_list); - RB_CLEAR_COLOR(&crq->rb_node); if (cfq_cfqq_on_rr(cfqq) && RB_EMPTY(&cfqq->sort_list)) cfq_del_cfqq_rr(cfqd, cfqq); |