Commit 3ee5234d authored by Alex Elder's avatar Alex Elder

libceph: init event->node in ceph_osdc_create_event()

The red-black node node in the ceph osd event structure is not
initialized in create_osdc_create_event().  Because this node can
be the subject of a RB_EMPTY_NODE() call later on, we should ensure
the node is initialized properly for that.
Signed-off-by: default avatarAlex Elder <elder@inktank.com>
Reviewed-by: default avatarSage Weil <sage@inktank.com>
parent f407731d
...@@ -1563,6 +1563,7 @@ int ceph_osdc_create_event(struct ceph_osd_client *osdc, ...@@ -1563,6 +1563,7 @@ int ceph_osdc_create_event(struct ceph_osd_client *osdc,
event->data = data; event->data = data;
event->osdc = osdc; event->osdc = osdc;
INIT_LIST_HEAD(&event->osd_node); INIT_LIST_HEAD(&event->osd_node);
RB_CLEAR_NODE(&event->node);
kref_init(&event->kref); /* one ref for us */ kref_init(&event->kref); /* one ref for us */
kref_get(&event->kref); /* one ref for the caller */ kref_get(&event->kref); /* one ref for the caller */
init_completion(&event->completion); init_completion(&event->completion);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment