diff options
author | Alex Elder <elder@inktank.com> | 2012-12-17 13:23:48 -0500 |
---|---|---|
committer | Alex Elder <elder@inktank.com> | 2012-12-20 11:56:33 -0500 |
commit | a978fa20fb657548561dddbfb605fe43654f0825 (patch) | |
tree | b7651c61cb309178e77af9e2d17fc6067cdcf794 /net | |
parent | 3ee5234df68d253c415ba4f2db72ad250d9c21a9 (diff) |
libceph: don't use rb_init_node() in ceph_osdc_alloc_request()
The red-black node in the ceph osd request structure is initialized
in ceph_osdc_alloc_request() using rbd_init_node(). We do need to
initialize this, because in __unregister_request() we call
RB_EMPTY_NODE(), which expects the node it's checking to have
been initialized. But rb_init_node() is apparently overkill, and
may in fact be on its way out. So use RB_CLEAR_NODE() instead.
For a little more background, see this commit:
4c199a93 rbtree: empty nodes have no color"
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/ceph/osd_client.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index 2bce3d4be1c6..7cd0a7f3bf43 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c | |||
@@ -221,7 +221,7 @@ struct ceph_osd_request *ceph_osdc_alloc_request(struct ceph_osd_client *osdc, | |||
221 | kref_init(&req->r_kref); | 221 | kref_init(&req->r_kref); |
222 | init_completion(&req->r_completion); | 222 | init_completion(&req->r_completion); |
223 | init_completion(&req->r_safe_completion); | 223 | init_completion(&req->r_safe_completion); |
224 | rb_init_node(&req->r_node); | 224 | RB_CLEAR_NODE(&req->r_node); |
225 | INIT_LIST_HEAD(&req->r_unsafe_item); | 225 | INIT_LIST_HEAD(&req->r_unsafe_item); |
226 | INIT_LIST_HEAD(&req->r_linger_item); | 226 | INIT_LIST_HEAD(&req->r_linger_item); |
227 | INIT_LIST_HEAD(&req->r_linger_osd); | 227 | INIT_LIST_HEAD(&req->r_linger_osd); |