]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
libceph: init event->node in ceph_osdc_create_event()
authorAlex Elder <elder@inktank.com>
Mon, 17 Dec 2012 18:23:48 +0000 (12:23 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Jan 2013 16:51:19 +0000 (08:51 -0800)
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>
(cherry picked from commit 3ee5234df68d253c415ba4f2db72ad250d9c21a9)
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ceph/osd_client.c

index 0b3fbdd7100a77b9ad44cb321af59afd7a9eba7a..6af3d2af31c834a8572bf18976b0935e29c0bc73 100644 (file)
@@ -1598,6 +1598,7 @@ int ceph_osdc_create_event(struct ceph_osd_client *osdc,
        event->data = data;
        event->osdc = osdc;
        INIT_LIST_HEAD(&event->osd_node);
+       RB_CLEAR_NODE(&event->node);
        kref_init(&event->kref);   /* one ref for us */
        kref_get(&event->kref);    /* one ref for the caller */
        init_completion(&event->completion);