From patchwork Sat Mar 9 13:27:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tangwenji X-Patchwork-Id: 10845917 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4786E1823 for ; Sat, 9 Mar 2019 13:27:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1913E2D84F for ; Sat, 9 Mar 2019 13:27:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 056192D870; Sat, 9 Mar 2019 13:27:29 +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.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,FROM_LOCAL_NOVOWEL,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 6F0C12D84F for ; Sat, 9 Mar 2019 13:27:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726308AbfCIN1Z (ORCPT ); Sat, 9 Mar 2019 08:27:25 -0500 Received: from m12-18.163.com ([220.181.12.18]:40081 "EHLO m12-18.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726268AbfCIN1Z (ORCPT ); Sat, 9 Mar 2019 08:27:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=xrJezRp8yuICUjClm9 MXdv9TuwuG9ppzmZ4Pi0W08z8=; b=qFrIEjQ+EkPSo4QccXVk+/BzCHhAWEK1A8 F7x+R+ERJIlgMDKYdzyxpJPUK9Ytcyw7Upe7yNrz61OT6vD+DHqMgzYUUtgren/W RlBLU453icCgDvqxw844XDqLhgmQcXv222RhNmYNJNIJ88JC6bLBMpnQ/Cj9Gdb1 ui5MtVhlw= Received: from localhost.localdomain (unknown [222.247.86.88]) by smtp14 (Coremail) with SMTP id EsCowAC3ENsdv4NcDjcKJQ--.52811S2; Sat, 09 Mar 2019 21:26:54 +0800 (CST) From: hndksztwj@163.com To: "Martin K. Petersen" Cc: Mike Christie , target-devel@vger.kernel.org, tangwenji Subject: [PATCH] target:tcmu free cmd->bdi in tcmu_check_and_free_pending_cmd Date: Sat, 9 Mar 2019 21:27:06 +0800 Message-Id: <1552138026-5016-1-git-send-email-hndksztwj@163.com> X-Mailer: git-send-email 2.5.0.windows.1 X-CM-TRANSID: EsCowAC3ENsdv4NcDjcKJQ--.52811S2 X-Coremail-Antispam: 1Uf129KBjvdXoW7GF48XFWxuF1kKrWruF47twb_yoW3Grg_uF 18Xr1IgFn5ur1Ikr1DCw1qvrya9r18uF1IvF4FkFW7tFyDWrn2q3sFvrnrAFyfXrZ5ZF90 vwnFvryxXF45JjkaLaAFLSUrUUUUbb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU0Pl1DUUUUU== X-Originating-IP: [222.247.86.88] X-CM-SenderInfo: 5kqgy2h2wzyqqrwthudrp/xtbBER5yQ1aD27p6vQAAsN 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 From: tangwenji Signed-off-by: tangwenji --- drivers/target/target_core_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c index 5831e0e..bb5d85d 100644 --- a/drivers/target/target_core_user.c +++ b/drivers/target/target_core_user.c @@ -1616,7 +1616,7 @@ static void tcmu_dev_call_rcu(struct rcu_head *p) static int tcmu_check_and_free_pending_cmd(struct tcmu_cmd *cmd) { if (test_bit(TCMU_CMD_BIT_EXPIRED, &cmd->flags)) { - kmem_cache_free(tcmu_cmd_cache, cmd); + tcmu_free_cmd(cmd); return 0; } return -EINVAL;