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:28 -0500 |
commit | 3ee5234df68d253c415ba4f2db72ad250d9c21a9 (patch) | |
tree | 1b1fa581b6527d98f03450375c3e555f314344ca /net | |
parent | f407731d12214e7686819018f3a1e9d7b6f83a02 (diff) |
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: Alex Elder <elder@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/ceph/osd_client.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index a6dc6acd6566..2bce3d4be1c6 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c | |||
@@ -1563,6 +1563,7 @@ int ceph_osdc_create_event(struct ceph_osd_client *osdc, | |||
1563 | event->data = data; | 1563 | event->data = data; |
1564 | event->osdc = osdc; | 1564 | event->osdc = osdc; |
1565 | INIT_LIST_HEAD(&event->osd_node); | 1565 | INIT_LIST_HEAD(&event->osd_node); |
1566 | RB_CLEAR_NODE(&event->node); | ||
1566 | kref_init(&event->kref); /* one ref for us */ | 1567 | kref_init(&event->kref); /* one ref for us */ |
1567 | kref_get(&event->kref); /* one ref for the caller */ | 1568 | kref_get(&event->kref); /* one ref for the caller */ |
1568 | init_completion(&event->completion); | 1569 | init_completion(&event->completion); |