From patchwork Mon Dec 17 18:33:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 1888511 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id A2C05DF266 for ; Mon, 17 Dec 2012 18:33:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753107Ab2LQSd0 (ORCPT ); Mon, 17 Dec 2012 13:33:26 -0500 Received: from mail-ia0-f174.google.com ([209.85.210.174]:65291 "EHLO mail-ia0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752868Ab2LQSdZ (ORCPT ); Mon, 17 Dec 2012 13:33:25 -0500 Received: by mail-ia0-f174.google.com with SMTP id y25so5844955iay.19 for ; Mon, 17 Dec 2012 10:33:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=kqmtvK/uuIEAtmJVb2prq4fYboSBjCytRtUZ4W1Xj5U=; b=N6acEMIDVKqbD3aY3NXmFNGdLa5ZGq4BBPj9VL9bAIAUl4qCRJe7H9VDeL6LVpuNEH mw6hDtgl/SQ0CNK6EGcabI2CFxW75BqMsdO/WwxUTRq0isDBaOLaUzdkaU5uz9Pt8Q87 amVXb3+FeMxxT/294M4nG3qPhl1pqrZpYIBMgschl+A7IrO4zp4wkxhyJoAbI+TyWM8v aIk5ANnO2gSHzvBmfgAopsWCBuwFYRQMr29zzNCFbMWzqlG3rY9f2+8pUsYj6sS+cj1x qfDcbJzEfXCUz/QEY6bqainZQJAUIEndFttqt9hvvBlBrAlItjj1x1aet5TqHEO0/g7h Q4jA== X-Received: by 10.50.190.162 with SMTP id gr2mr10111232igc.65.1355769205446; Mon, 17 Dec 2012 10:33:25 -0800 (PST) Received: from [172.22.22.4] (c-71-195-31-37.hsd1.mn.comcast.net. [71.195.31.37]) by mx.google.com with ESMTPS id px5sm6399082igc.0.2012.12.17.10.33.23 (version=SSLv3 cipher=OTHER); Mon, 17 Dec 2012 10:33:24 -0800 (PST) Message-ID: <50CF6577.40106@inktank.com> Date: Mon, 17 Dec 2012 12:33:27 -0600 From: Alex Elder User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: ceph-devel@vger.kernel.org Subject: [PATCH 2/3] libceph: init event->node in ceph_osdc_create_event() References: <50CF6501.5070707@inktank.com> In-Reply-To: <50CF6501.5070707@inktank.com> X-Gm-Message-State: ALoCoQm0Z8+3ZGX9/7Z3VLqHJYxhkUOgpmjpZ/TEYh4qQsOzWffnTX/T8xUNM4EeVRe3YKVPM1fy Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org 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 --- net/ceph/osd_client.c | 1 + 1 file changed, 1 insertion(+) init_completion(&event->completion); diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index a6dc6ac..2bce3d4 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, 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 */