From patchwork Mon Feb 8 13:25:38 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Or Gerlitz X-Patchwork-Id: 77736 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o18DPQcB003819 for ; Mon, 8 Feb 2010 13:25:26 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751847Ab0BHNZZ (ORCPT ); Mon, 8 Feb 2010 08:25:25 -0500 Received: from fwil.voltaire.com ([193.47.165.2]:38918 "EHLO exil.voltaire.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751744Ab0BHNZZ (ORCPT ); Mon, 8 Feb 2010 08:25:25 -0500 Received: from zuben.voltaire.com ([172.25.5.15]) by exil.voltaire.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 8 Feb 2010 15:25:23 +0200 Date: Mon, 8 Feb 2010 15:25:38 +0200 (IST) From: Or Gerlitz To: Roland Dreier cc: linux-rdma , Mike Christie Subject: [PATCH RESEND V2 09/9] ib/iser: remove redundant locking from iser scsi command response flow In-Reply-To: Message-ID: References: MIME-Version: 1.0 X-OriginalArrivalTime: 08 Feb 2010 13:25:23.0615 (UTC) FILETIME=[2B3EFAF0:01CAA8C2] Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 08 Feb 2010 13:25:27 +0000 (UTC) Index: linux-2.6.33-rc7/drivers/infiniband/ulp/iser/iser_initiator.c =================================================================== --- linux-2.6.33-rc7.orig/drivers/infiniband/ulp/iser/iser_initiator.c +++ linux-2.6.33-rc7/drivers/infiniband/ulp/iser/iser_initiator.c @@ -440,10 +440,7 @@ void iser_rcv_completion(struct iser_rx_ struct iser_conn *ib_conn) { struct iscsi_iser_conn *conn = ib_conn->iser_conn; - struct iscsi_task *task; - struct iscsi_iser_task *iser_task; struct iscsi_hdr *hdr; - unsigned char opcode; u64 rx_dma; int rx_buflen, outstanding, count, err; @@ -464,28 +461,6 @@ void iser_rcv_completion(struct iser_rx_ iser_dbg("op 0x%x itt 0x%x dlen %d\n", hdr->opcode, hdr->itt, (int)(rx_xfer_len - ISER_HEADERS_LEN)); - opcode = hdr->opcode & ISCSI_OPCODE_MASK; - - if (opcode == ISCSI_OP_SCSI_CMD_RSP) { - spin_lock(&conn->iscsi_conn->session->lock); - task = iscsi_itt_to_ctask(conn->iscsi_conn, hdr->itt); - if (task) - __iscsi_get_task(task); - spin_unlock(&conn->iscsi_conn->session->lock); - - if (!task) - iser_err("itt can't be matched to task!!! " - "conn %p opcode %d itt %d\n", - conn->iscsi_conn, opcode, hdr->itt); - else { - iser_task = task->dd_data; - iser_dbg("itt %d task %p\n",hdr->itt, task); - iser_task->status = ISER_TASK_STATUS_COMPLETED; - iser_task_rdma_finalize(iser_task); - iscsi_put_task(task); - } - } - iscsi_iser_recv(conn->iscsi_conn, hdr, rx_desc->data, rx_xfer_len - ISER_HEADERS_LEN);