From patchwork Mon Nov 4 12:53:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 3135681 X-Patchwork-Delegate: hal@mellanox.com 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 D892EBEEB2 for ; Mon, 4 Nov 2013 12:53:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4AD032031C for ; Mon, 4 Nov 2013 12:53:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 17A1F20265 for ; Mon, 4 Nov 2013 12:53:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751519Ab3KDMxR (ORCPT ); Mon, 4 Nov 2013 07:53:17 -0500 Received: from mail-ea0-f177.google.com ([209.85.215.177]:34755 "EHLO mail-ea0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751322Ab3KDMxQ (ORCPT ); Mon, 4 Nov 2013 07:53:16 -0500 Received: by mail-ea0-f177.google.com with SMTP id f15so3387171eak.22 for ; Mon, 04 Nov 2013 04:53:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:content-type:content-transfer-encoding; bh=VqSURu4eSjzg+/T1xr6LywpwQt08PQNVwP6OnPYaLVw=; b=iFE1KsWdwYAVWRSQ0dQh/dHQT3y3mn2SGS7awmcIPwXHgTpX/ILBY1JwR+4GyuwiFz VBndZOM3esigiEdqEH79OWm+ax5daZ8V+q3eh2McJ+6dNgv9xHwP80vqbOl675qSsZoh j+V2TZNxvmdL+rrMkR4sRFxvJ0vW/IfCUfA3RPk8zos3ZPMZ1ZF7pDmlJSjBdsOPiKwg 1JZTUe8okggA3chaED0qqbcmRw2mbXgpiTjlzdL0ECWNpvg7jGCaW6JebqGif7eC7Sbr jcQrpKnF49FXFvl/S25oP+iV3xpTLJVjQ60liqWDCLN2yusyPuzZxgBQVW+ZlshKYuDb bQBQ== X-Gm-Message-State: ALoCoQlQVwVbtK+sflnOXR/fSVlsz1JtghXxOTkg6Gcdn4pXhjrHialfU3u1o0Q1Rjr2GSHN1meF X-Received: by 10.15.31.9 with SMTP id x9mr7295791eeu.53.1383569595886; Mon, 04 Nov 2013 04:53:15 -0800 (PST) Received: from [192.168.1.102] (c-98-229-118-119.hsd1.ma.comcast.net. [98.229.118.119]) by mx.google.com with ESMTPSA id i47sm22972614eem.5.2013.11.04.04.53.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 04 Nov 2013 04:53:15 -0800 (PST) Message-ID: <527798BA.10509@dev.mellanox.co.il> Date: Mon, 04 Nov 2013 07:53:14 -0500 From: Hal Rosenstock User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: "linux-rdma (linux-rdma@vger.kernel.org)" CC: Vladimir Koushnir Subject: [PATCH opensm] When exiting, update SADB only in MASTER state 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, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 From: Vladimir Koushnir Signed-off-by: Vladimir Koushnir Signed-off-by: Hal Rosenstock --- opensm/osm_opensm.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/opensm/osm_opensm.c b/opensm/osm_opensm.c index b3c487f..f2e04f6 100644 --- a/opensm/osm_opensm.c +++ b/opensm/osm_opensm.c @@ -132,7 +132,8 @@ void osm_opensm_destroy(IN osm_opensm_t * p_osm) cl_disp_shutdown(&p_osm->sminfo_get_disp); /* dump SA DB */ - if (p_osm->subn.opt.sa_db_dump) + if ((p_osm->sm.p_subn->sm_state == IB_SMINFO_STATE_MASTER) && + p_osm->subn.opt.sa_db_dump) osm_sa_db_file_dump(p_osm); /* do the destruction in reverse order as init */