From patchwork Thu Mar 13 17:05:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arlin Davis X-Patchwork-Id: 3827391 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 255EEBF540 for ; Thu, 13 Mar 2014 17:11:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B5713201C0 for ; Thu, 13 Mar 2014 17:11:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 10752201BB for ; Thu, 13 Mar 2014 17:11:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754468AbaCMRLC (ORCPT ); Thu, 13 Mar 2014 13:11:02 -0400 Received: from mga01.intel.com ([192.55.52.88]:34123 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754464AbaCMRLB (ORCPT ); Thu, 13 Mar 2014 13:11:01 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 13 Mar 2014 10:06:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,648,1389772800"; d="scan'208";a="497894379" Received: from orsmsx106.amr.corp.intel.com ([10.22.225.133]) by fmsmga002.fm.intel.com with ESMTP; 13 Mar 2014 10:05:04 -0700 Received: from orsmsx111.amr.corp.intel.com (10.22.240.12) by ORSMSX106.amr.corp.intel.com (10.22.225.133) with Microsoft SMTP Server (TLS) id 14.3.123.3; Thu, 13 Mar 2014 10:05:04 -0700 Received: from orsmsx101.amr.corp.intel.com ([169.254.8.45]) by ORSMSX111.amr.corp.intel.com ([169.254.11.72]) with mapi id 14.03.0123.003; Thu, 13 Mar 2014 10:05:03 -0700 From: "Davis, Arlin R" To: "linux-rdma@vger.kernel.org" CC: "ofw@lists.openfabrics.org" , "ewg@lists.openfabrics.org" Subject: [PATCH 4/5] dat: dat_ia_open needs to close provider after failure Thread-Topic: [PATCH 4/5] dat: dat_ia_open needs to close provider after failure Thread-Index: Ac8+3kiK3H3AQK0nQ8WkXznBRJ/wSA== Date: Thu, 13 Mar 2014 17:05:03 +0000 Message-ID: <54347E5A035A054EAE9D05927FB467F972E0C903@ORSMSX101.amr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.22.254.139] MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Arlin Davis --- dat/udat/udat.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) -- 1.7.3 diff --git a/dat/udat/udat.c b/dat/udat/udat.c index 03edcf9..842b36c 100755 --- a/dat/udat/udat.c +++ b/dat/udat/udat.c @@ -210,6 +210,12 @@ dat_ia_openv(IN const DAT_NAME_PTR name, async_event_handle, ia_handle); if (dat_status == DAT_SUCCESS) { *ia_handle = (DAT_IA_HANDLE) dats_set_ia_handle(*ia_handle); + } else { + (void)dat_dr_provider_close(&info); +#ifndef DAT_NO_STATIC_REGISTRY + (void)dat_sr_provider_close(&info); +#endif + return dat_status; } /*