summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2012-12-06 07:22:04 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-17 08:51:19 -0800
commit281c5d9e31a2411055bc750d81dd38d11131648e (patch)
treef42562cdaed0ddb70e90c5470145ad879d2cb915 /net
parent6ea5c964ecc4037d4ae56694982be253bd821685 (diff)
libceph: init osd->o_node in create_osd()
The red-black node node in the ceph osd structure is not initialized in create_osd(). 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. Add a call to RB_CLEAR_NODE() initialize it. Signed-off-by: Alex Elder <elder@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com> (cherry picked from commit f407731d12214e7686819018f3a1e9d7b6f83a02) Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r--net/ceph/osd_client.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index 37a9f1e61241..0b3fbdd7100a 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -645,6 +645,7 @@ static struct ceph_osd *create_osd(struct ceph_osd_client *osdc, int onum)
atomic_set(&osd->o_ref, 1);
osd->o_osdc = osdc;
osd->o_osd = onum;
+ RB_CLEAR_NODE(&osd->o_node);
INIT_LIST_HEAD(&osd->o_requests);
INIT_LIST_HEAD(&osd->o_linger_requests);
INIT_LIST_HEAD(&osd->o_osd_lru);