From patchwork Wed Feb 24 17:24:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sagi Grimberg X-Patchwork-Id: 8410161 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 737EC9F372 for ; Wed, 24 Feb 2016 17:24:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9F07F202EB for ; Wed, 24 Feb 2016 17:24:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3CA9B2035B for ; Wed, 24 Feb 2016 17:24:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755385AbcBXRYt (ORCPT ); Wed, 24 Feb 2016 12:24:49 -0500 Received: from [193.47.165.129] ([193.47.165.129]:47666 "EHLO mellanox.co.il" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1757878AbcBXRYs (ORCPT ); Wed, 24 Feb 2016 12:24:48 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from sagig@mellanox.com) with ESMTPS (AES256-SHA encrypted); 24 Feb 2016 19:24:13 +0200 Received: from r-vnc05.mtr.labs.mlnx (r-vnc05.mtr.labs.mlnx [10.208.0.115]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id u1OHODtK025310; Wed, 24 Feb 2016 19:24:13 +0200 Received: from r-vnc05.mtr.labs.mlnx (localhost [127.0.0.1]) by r-vnc05.mtr.labs.mlnx (8.14.4/8.14.4) with ESMTP id u1OHOCuu021519; Wed, 24 Feb 2016 19:24:12 +0200 Received: (from sagig@localhost) by r-vnc05.mtr.labs.mlnx (8.14.4/8.14.4/Submit) id u1OHOCYL021518; Wed, 24 Feb 2016 19:24:12 +0200 From: Sagi Grimberg To: "Nicholas A. Bellinger" Cc: target-devel@vger.kernel.org, linux-rdma@vger.kernel.org, Jenny Derzhavetz Subject: [PATCH 05/12] iser-target: Remove redundant wait in release_conn Date: Wed, 24 Feb 2016 19:24:02 +0200 Message-Id: <1456334649-21437-6-git-send-email-sagig@mellanox.com> X-Mailer: git-send-email 1.8.4.3 In-Reply-To: <1456334649-21437-1-git-send-email-sagig@mellanox.com> References: <1456334649-21437-1-git-send-email-sagig@mellanox.com> 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: Jenny Derzhavetz With current termination flow we call release_conn after completion. Signed-off-by: Jenny Derzhavetz Signed-off-by: Sagi Grimberg --- drivers/infiniband/ulp/isert/ib_isert.c | 7 ------- drivers/infiniband/ulp/isert/ib_isert.h | 1 - 2 files changed, 8 deletions(-) diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c index 0e1a802c3618..01d37260a8d8 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.c +++ b/drivers/infiniband/ulp/isert/ib_isert.c @@ -583,7 +583,6 @@ isert_init_conn(struct isert_conn *isert_conn) INIT_LIST_HEAD(&isert_conn->node); init_completion(&isert_conn->login_comp); init_completion(&isert_conn->login_req_comp); - init_completion(&isert_conn->wait); kref_init(&isert_conn->kref); mutex_init(&isert_conn->mutex); spin_lock_init(&isert_conn->pool_lock); @@ -834,7 +833,6 @@ isert_handle_unbound_conn(struct isert_conn *isert_conn) */ list_del_init(&isert_conn->node); isert_put_conn(isert_conn); - complete(&isert_conn->wait); queue_work(isert_release_wq, &isert_conn->release_work); } mutex_unlock(&isert_np->mutex); @@ -867,9 +865,6 @@ isert_conn_terminate(struct isert_conn *isert_conn) if (err) isert_warn("Failed rdma_disconnect isert_conn %p\n", isert_conn); - - isert_info("conn %p completing wait\n", isert_conn); - complete(&isert_conn->wait); } static int @@ -3274,8 +3269,6 @@ static void isert_release_work(struct work_struct *work) isert_info("Starting release conn %p\n", isert_conn); - wait_for_completion(&isert_conn->wait); - mutex_lock(&isert_conn->mutex); isert_conn->state = ISER_CONN_DOWN; mutex_unlock(&isert_conn->mutex); diff --git a/drivers/infiniband/ulp/isert/ib_isert.h b/drivers/infiniband/ulp/isert/ib_isert.h index 1aa019ab9d78..9f916b12cf40 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.h +++ b/drivers/infiniband/ulp/isert/ib_isert.h @@ -201,7 +201,6 @@ struct isert_conn { struct ib_qp *qp; struct isert_device *device; struct mutex mutex; - struct completion wait; struct completion wait_comp_err; struct kref kref; struct list_head fr_pool;