From patchwork Thu Mar 30 17:12:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 9654863 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id ACE0760113 for ; Thu, 30 Mar 2017 17:13:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 97CA3285BD for ; Thu, 30 Mar 2017 17:13:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8CAFD285C1; Thu, 30 Mar 2017 17:13:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E1036285BD for ; Thu, 30 Mar 2017 17:13:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933259AbdC3RND (ORCPT ); Thu, 30 Mar 2017 13:13:03 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:43016 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933206AbdC3RNA (ORCPT ); Thu, 30 Mar 2017 13:13:00 -0400 X-IronPort-AV: E=Sophos;i="5.36,247,1486396800"; d="scan'208";a="7316755" Received: from mail-sn1nam01lp0112.outbound.protection.outlook.com (HELO NAM01-SN1-obe.outbound.protection.outlook.com) ([207.46.163.112]) by ob1.hgst.iphmx.com with ESMTP; 31 Mar 2017 01:12:56 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=rPMru2drqF2XhmGhJf+nd/322omymxjeuPNbJUIORnA=; b=uHFoptpd3dTrb3iIT0DIZPB1OGX1EiLbqwxjybgZOAmu+LWEPwEtalIzUSFC8emvD+NVbNwZTv8nmlRi48HdvwQPZI9q6NiDO9GKl6rVYYE+pTPXp59rLnS8SAmFyReV4IxTFar38zVkOqZ60/2s5ClWKojDVhBC0A9SewSVSbI= Received: from BN6PR04CA0014.namprd04.prod.outlook.com (10.172.194.24) by BN1PR04MB108.namprd04.prod.outlook.com (10.255.199.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.991.14; Thu, 30 Mar 2017 17:12:52 +0000 Received: from CO1NAM04FT019.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4d::209) by BN6PR04CA0014.outlook.office365.com (2603:10b6:404:cb::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1005.10 via Frontend Transport; Thu, 30 Mar 2017 17:12:52 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.21 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.21; helo=milsmgep15.sandisk.com; Received: from milsmgep15.sandisk.com (63.163.107.21) by CO1NAM04FT019.mail.protection.outlook.com (10.152.90.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1005.5 via Frontend Transport; Thu, 30 Mar 2017 17:12:52 +0000 Received: from MILHUBIP03.sdcorp.global.sandisk.com (Unknown_Domain [10.201.67.162]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by (Symantec Messaging Gateway) with SMTP id 53.BD.29323.29C3DD85; Thu, 30 Mar 2017 10:12:50 -0700 (PDT) Received: from milsmgip12.sandisk.com (10.177.9.6) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.319.2; Thu, 30 Mar 2017 10:12:48 -0700 X-AuditID: 0ac94369-548749800000728b-4b-58dd3c92da4a Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id FB.29.18148.09C3DD85; Thu, 30 Mar 2017 10:12:48 -0700 (PDT) From: Bart Van Assche To: Nicholas Bellinger CC: , Bart Van Assche , Varun Prakash , Subject: [PATCH 2/6] target/iscsi: Call .iscsit_release_cmd() once Date: Thu, 30 Mar 2017 10:12:40 -0700 Message-ID: <20170330171244.8346-3-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170330171244.8346-1-bart.vanassche@sandisk.com> References: <20170330171244.8346-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrELMWRmVeSWpSXmKPExsXCddJ5ke4km7sRBs3/hC3aVp9htFiw8RGj RevSt0wWs9a/YnJg8Xi6Yw6rx/3tR5g8Pm+SC2CO4rJJSc3JLEst0rdL4Mr4//kEU8E3vopN mz4wNjCe5+li5OSQEDCRmNO+k7GLkYtDSGApk8T5e92sEM42RomXDW9Zuhg5wKqapwdBxDcz SvxY2McK0s0mYCTx7f1MFhBbREBHYtbdF+wgRcwCExkltu1cxQSSEBZwklh19TMziM0ioCpx bAlEM6+AncTMiY3sEGfISyzaNANsEKeAvcSFa4vA4kJANe/a+8CGSgi0sUr8etEB1SwocXLm E7AGZgEJiYMvXjBDNKhLnFwyn2kCo9AsJGWzkJQtYGRaxSiWm5lTnJueWmBoqlecmJeSWZyt l5yfu4kREtKZOxjvPvE+xCjAwajEw7tD8G6EEGtiWXFl7iFGCQ5mJRHeDmugEG9KYmVValF+ fFFpTmrxIUZpDhYlcd5zMlMjhATSE0tSs1NTC1KLYLJMHJxSDYwVP15YTns2/Yn3/JtLCmw/ 39FV6OaLeuDt1LDJNCSxKHTlj013hfpLPFgz0vd+Fz1VyjzfleFTT6HHtYTLqfYJ20X0NQ84 5fIGvTj/+u2ps343vLac2GfaetI/fPv8T7Jr7TdvezK9+p9gwoEbE+rObeioPhAZduHnxab6 zRu7mbzj3xrvYr+vxFKckWioxVxUnAgAGvj7yWUCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrIJMWRmVeSWpSXmKPExsXCtZEjRXeCzd0Ig6YVUhYHf7YxWrStPsNo sWDjI0aL1qVvmSxmrX/F5MDq8XTHHFaP+9uPMHlMW3OeyePzJrkAligum5TUnMyy1CJ9uwSu jP+fTzAVfOOr2LTpA2MD43meLkYODgkBE4nm6UFdjFwcQgIbGSV6Tx5l6mLk5GATMJL49n4m C4gtIqAjMevuC3aQImaBfkaJq22LWEESwgJOEquufmYGsVkEVCWOLekDi/MK2ElMftIOZksI yEss2jQDbBCngL3EhWuL2EFsIaCad+197BMYuRcwMqxiFMvNzCnOTc8sMDTSK07MS8ksztZL zs/dxAgOBM6oHYzXJ5ofYmTi4JRqYGTPfeuhL6gTs6L4OE/h69W5Jv8+PN255NBRnjcTWxet nfvMn/V823zBJaX8cxvfXJycNUv86fzl/Ol5NwRtZN6o7uX8IK/lvkf4VumUOpbjE9p55XZu jQtizlqzdW3lPdZXBx5OezOJ9VwHnymjaGD/Yo7i3PD98j8SVOZr3mWZoi8/49jBzB9KLMUZ iYZazEXFiQBHbWi/tAEAAA== MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.21; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39410400002)(39850400002)(39400400002)(39860400002)(39450400003)(39840400002)(2980300002)(438002)(199003)(189002)(9170700003)(2950100002)(81166006)(6666003)(8936002)(50226002)(305945005)(8676002)(33646002)(6916009)(5003940100001)(38730400002)(356003)(77096006)(5660300001)(110136004)(54906002)(36756003)(4326008)(76176999)(50986999)(1076002)(106466001)(189998001)(53936002)(86362001)(47776003)(50466002)(2906002)(48376002)(142923001); DIR:OUT; SFP:1102; SCL:1; SRVR:BN1PR04MB108; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM04FT019; 1:XqCITUNd2gO3Ag/HWJXKne3DFEXsWqH9tpk4kssiwqcNBpJD2DIBwKs/574C6b0QRSIQCQWUEwaYRa0W7MNogQWNS/t2tUVLBcOkVyUpC/vvoa7sdUFrXHmiajUbnbGUXS7fJn2oTzLccsgcbESkidjBxhR5IDSGS7rbGeUaxDMB6ZdrAVif/GVZzuzwRU7Om5Y57gMRJ9RaaCmLa3YiN8YIs9baVz4VPSq3e6S7LE1yz2Opi4FrXprkKDVFxIKpnj1e5ySH/UhgmUxkESVs5NDqlbKGeZTELI0svmmZbamooTEsQHtJ+SVjLf3IhxsYOCY0QuFMq67ak3KtH+xIRZBb2OBagfaEcn7o3WLbTvX03e8XW8eGkIhxskXby8rk7OjqVTSFLw+61QiLF6MpnfWYWuGefcWPg5/4ZlkLXCMQLiCOTZkDVpHowk2NmVlTr+o/W+uJHvU38JS/M8OPNRqXB0uKLDefQvNNsPF9zqQgCb3u96PDa91RZOJA/vWVLXhgadlhP+lNrZOgAdRMtTjDUp+XGR40mWExp5UZs84= X-MS-Office365-Filtering-Correlation-Id: e9982941-66f0-4428-814a-08d4778fffe2 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:BN1PR04MB108; X-Microsoft-Exchange-Diagnostics: 1; BN1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FlWMLaIbOoWWoJRkdeOco5TtcrUf2BCwg+En32GUc8xy3lgvgTi1JajtfdviBw3jqK9pmQMPrYl+tfcHAUsHUJoAbmLus9g0FTX/tVW0DvPeS6owUrKm4L3FEz7+7DXMA/l5duBXvk7V/qmy706PmM4AK9EOexR+PRhraO4W4IXFZ+lr5Zl+Q6x6IgI1HNVxR+J4SWTQKeEfI8F9OAxK8/SEx3x5hKrB4CogwUTnLiLT0A== WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; BN1PR04MB108; 20:s6NmeJe+GSru25dTT0tCZfl41Kv+CKjkJbRPet8gHFY7zFEedmOoouN0iSQYYOjZBVG+EjTVc+MKFXWBzzPCub6Lx2zrkJRJ15vMZpozELCOUMZ1aRiX6pW2bAJ/g9ETL33vu1Nl6pkO8FZJZO9KGgBQiPOQ9iZS8igQIyYX0DaG2jdCLhDr1TU+EUdgisuUuBBAcCTjWYGhEQ/rM2LCZ+2UUlYuy0ZIicEiru92YmXl00sBYwuRiTW76kZ5DErd1extQSDHpgtGWEL01fe4aLxQWZwbbt2qINZO1qZ/iHDNxvDf8jdfDSWcxQcZuxVeXbJRMEB59caPMTtdVf7uVVr+pCoFU79FLOOeP0C1ED4O5Ca95mvtavZZHF4rEgMQAVdfp4Y5BtOJMMdMA1F3OTYs21LpOSa0F84CBwK5hbW8ww5agguKZHc7xIuB5eLeggPIkgi8HAhsw0Lr4k5WROQ3xvxBXirZehj8HNjilxP37/+zYQ5vCvDF9P/eQc+F X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(9452136761055)(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(13016025)(5005006)(13018025)(10201501046)(3002001)(93006067)(93004067)(6055026)(6041248)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(20161123555025)(20161123562025)(20161123560025)(6072148); SRVR:BN1PR04MB108; BCL:0; PCL:0; RULEID:;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vZyi0ScTill?= =?us-ascii?Q?X7WC1Vyr5HO3lCsjCNmW1Betby8asp3EUG8LPQcwEB0MwzZMEKCYqZ9hdlFn?= =?us-ascii?Q?+BHa6VHhYHkEgDYduvFgnGLYLeI9hMkSGlZumfSDgAjikaaqJWcvEBYvuyke?= =?us-ascii?Q?qOnI8=3D?= X-Microsoft-Exchange-Diagnostics: 1; BN1PR04MB108; 6:fltL5JoJYkREDn3C7sdi3o/LpsGpQNoGlKeNuCbEQ2UIMk5h7RjUktxIA2hB2tTcOvMmqAez6EXo6Wpn1EO/g0melo0wfzkxvMMXK10uXmbAk8Ng+1X4Yooc8XUX8UXT6ahavxF6FDXetcTxUgWyPb9gsYir0lhE36ZkB0LHSYNm4sEypWPD2ia4MuXtq8k8cltV7y//D1xOjJ/BJn26nHNvnq6zsA0zcG3oKHQiLUp38X0+luLmmZKYXvmR1i2JHkHsKhLnDL7SFUf8PK67M7uPzc9mpCWg5juak8njR8cz2LlpG87PAnF6hHpUU2vFGe72CDNhDcdViTUf1sWGceSAz3YUcEwfgcrY36mwBNdPc/0msdr4P39N6DX4DBfCyrXp2T9QOJf2QAGb/2YmbI1l1DaYHR321wr0YMldjkc=; 5:bOueyLMz/okkKHCuC08O5XssGxoMDe3MbmbAIUv/Og1U3UALgPk2jksxQ6BmT4bkxTmclHWx1PdIhcy0rWDvWWTSm3vzfRcZcUmoM806cQQXDymnCo68JCVFeQ8BbqiYGVmOhs+qGO+WJX/J86gXrQ==; 24:Fn14qrsyOt1EbYKofn2yA62KkMUkCyO1KDYQm6ZI6cdWulJ0zjJlfoHF5rKw9tC7KixH9JDkzo6r/GKPyL38pzS9O81WoXz0mRghyI93vMA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN1PR04MB108; 7:HDfO7jdZYcCbL4bKpUhHaglg+Gv6/ybL1+RJb7vl13JjpQ0zYK7LnlX37EPIrCi1yz1jcDv1dfm9U9/zvWaRzVSYKcUWJf7M3M403BpsobznhJ0eFggTbeG6EMnn8G89U2sAyv1sVe7zyZIjLe6XGEy19oySOEWDNYX/X2BacCTWME686q1jY08ERmF0QNhxmT/UY3jqKLFW22s4xFWksolZNxLawht0vYZUevaBYc+oUQBZQVqPqkkznc5ZMPbFZFvyFiVzTKxx1L5BNWS4YqBSQ/n1aPDtrbj8LkDomV45533wO+E2okMumJhqBH4ZcZsTqarcOP4t+F602BvFcA==; 20:0ci3/B8J7Izw/gc79n8Is8Eh2zDZFe3PDhOAzU7LbxV+0YyE9ettefEqoWsQIpEwxgrPeapYhV10Fq2mXIUAYnqV+j78lmPTrt4OubW3VXtx6bAb1u1MsLWeVUD4JXrygDQmLjFZzErkchKLI1RAsQPRTznoNSLTjSmmWA06pVg= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Mar 2017 17:12:52.0489 (UTC) X-MS-Exchange-CrossTenant-Id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=b61c8803-16f3-4c35-9b17-6f65f441df86; Ip=[63.163.107.21]; Helo=[milsmgep15.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR04MB108 Sender: target-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: target-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP While releasing a command __iscsit_free_cmd() can be called multiple times but .iscsit_release_cmd() must be called only once. Hence move the .iscsit_release_cmd() call into iscsit_release_cmd(). The latter function is only called once per command. The only driver that defines the .iscsit_release_cmd() callback is the cxgbit driver so this change only affects the cxgbit driver. Fixes: 7ec811a8e9c3 ("iscsi-target: add void (*iscsit_release_cmd)()") Signed-off-by: Bart Van Assche Cc: Varun Prakash Cc: Nicholas Bellinger Cc: --- drivers/target/iscsi/iscsi_target_util.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/target/iscsi/iscsi_target_util.c b/drivers/target/iscsi/iscsi_target_util.c index 5041a9c8bdcb..8a022b5b2317 100644 --- a/drivers/target/iscsi/iscsi_target_util.c +++ b/drivers/target/iscsi/iscsi_target_util.c @@ -691,11 +691,17 @@ void iscsit_release_cmd(struct iscsi_cmd *cmd) { struct iscsi_session *sess; struct se_cmd *se_cmd = &cmd->se_cmd; + struct iscsi_conn *conn = cmd->conn; + void (*release)(struct iscsi_conn *, struct iscsi_cmd *); - if (cmd->conn) - sess = cmd->conn->sess; - else + if (conn) { + sess = conn->sess; + release = conn->conn_transport->iscsit_release_cmd; + if (release) + release(conn, cmd); + } else { sess = cmd->sess; + } BUG_ON(!sess || !sess->se_sess); @@ -728,9 +734,6 @@ void __iscsit_free_cmd(struct iscsi_cmd *cmd, bool scsi_cmd, iscsit_remove_cmd_from_immediate_queue(cmd, conn); iscsit_remove_cmd_from_response_queue(cmd, conn); } - - if (conn && conn->conn_transport->iscsit_release_cmd) - conn->conn_transport->iscsit_release_cmd(conn, cmd); } void iscsit_free_cmd(struct iscsi_cmd *cmd, bool shutdown)