From patchwork Fri Jun 22 21:52:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10483099 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 4BA496023A for ; Fri, 22 Jun 2018 21:53:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A05829043 for ; Fri, 22 Jun 2018 21:53:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2F01829042; Fri, 22 Jun 2018 21:53:13 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, 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 E7C4D29044 for ; Fri, 22 Jun 2018 21:53:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754519AbeFVVxL (ORCPT ); Fri, 22 Jun 2018 17:53:11 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:27587 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754465AbeFVVxJ (ORCPT ); Fri, 22 Jun 2018 17:53:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1529704414; x=1561240414; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=csMEm2+DAkbwFCKlsYPGbPcZO04lP3f+Wh0a30VvbQ8=; b=UPJkLCu+dKo7ZPF9dSFIE1Mah1zVV/YcbCCVvDkknDbFQFaddBgY8Tfz /1J3YRbCCGLxi1U6dCdYR1jeZgcqc0cqxQEqM463Lk8czQrgGZrLgnHpk m1rvebBs+orOnOZUDS5tMAjsNaeFnZ0MhIYMuMhKeed+tGr8kEFtnD6XV +l+lfrU4B/ZKHQKdIr+YqEeygEDCYU3UkGr+TVs4XxBM8+FERyl0JzQJo jmc+BNvR1oMLxXjsxYWikOttrWxCPI7qbetmpddxYSgMGnbLYoGjPepTe WJoP8lgcbyo3sbPjKkHqXpx9fI/oZMb6hZougjNMVo8dqV8iZC7IseEFE w==; X-IronPort-AV: E=Sophos;i="5.51,259,1526313600"; d="scan'208";a="178350988" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 23 Jun 2018 05:53:33 +0800 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP; 22 Jun 2018 14:42:55 -0700 Received: from thinkpad-bart.sdcorp.global.sandisk.com ([10.111.67.248]) by uls-op-cesaip01.wdc.com with ESMTP; 22 Jun 2018 14:53:09 -0700 From: Bart Van Assche To: "Martin K . Petersen" Cc: Christoph Hellwig , target-devel@vger.kernel.org, Bart Van Assche , Mike Christie , Hannes Reinecke Subject: [PATCH 03/20] target: Move a list_del_init() statement Date: Fri, 22 Jun 2018 14:52:50 -0700 Message-Id: <20180622215307.8758-4-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180622215307.8758-1-bart.vanassche@wdc.com> References: <20180622215307.8758-1-bart.vanassche@wdc.com> 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 This patch does not change any functionality but makes the next patch easier to read. Signed-off-by: Bart Van Assche Cc: Mike Christie Cc: Hannes Reinecke Cc: Christoph Hellwig --- drivers/target/target_core_transport.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 89dd475d0a8f..5e8329c5ddd0 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -2697,6 +2697,7 @@ static void target_release_cmd_kref(struct kref *kref) if (se_sess) { spin_lock_irqsave(&se_sess->sess_cmd_lock, flags); + list_del_init(&se_cmd->se_cmd_list); spin_lock(&se_cmd->t_state_lock); fabric_stop = (se_cmd->transport_state & CMD_T_FABRIC_STOP) && @@ -2704,13 +2705,11 @@ static void target_release_cmd_kref(struct kref *kref) spin_unlock(&se_cmd->t_state_lock); if (se_cmd->cmd_wait_set || fabric_stop) { - list_del_init(&se_cmd->se_cmd_list); spin_unlock_irqrestore(&se_sess->sess_cmd_lock, flags); target_free_cmd_mem(se_cmd); complete(&se_cmd->cmd_wait_comp); return; } - list_del_init(&se_cmd->se_cmd_list); spin_unlock_irqrestore(&se_sess->sess_cmd_lock, flags); }