Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2392282pxb; Thu, 4 Nov 2021 20:07:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZUHh+qUkwF+pvsi4XVbzztMnLQTQA+Zlyazgj2tyrwzQtxPeFj4Jb/ZmmadAPIGOjoMKt X-Received: by 2002:a17:906:4d4a:: with SMTP id b10mr17684883ejv.89.1636081644574; Thu, 04 Nov 2021 20:07:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636081644; cv=none; d=google.com; s=arc-20160816; b=kuMxeplevE+uULnJvY2YQfuCfloJm1YPxp1c9OtB6vCXubbbjGi9m1qONWfPK+s4W8 i/TbO64Ax6iyEG7h1aCTm0Iw5QYYvXjR/hRSydCmACPgXrwf4wyf6aQ1bQM0hT5sz8Oh aKP3jdf7qI5eJA1fHwX9//lN9fYj0QBWJodcBksmIXIHX58x1pDNFJtDrPrDeFWcyyUE BsScishqfbJajVVjV50NZF5Yykfiyo/HPmEP56tr1UYpg3TF+WfOusVUec5ZpIs+O9If o5iHbHaHRgeZxukP02T4WCGiunMpxgJn8qH5be20swiq/GnOeNrbFD3VzFZpNXOKNsTv rozA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=3IUSFBfOZn5aZwQ7hyn0BbyFqV0S0fAawBlI6j1kcEA=; b=Tp4f+Mk5uua8amfau94o0Q2O1NoMeZEN6Osyl48coWjZXOYCCHZOj5cGAb+Iw9T7f0 S14DHEcGskHL2pnAILUWTbegLz5xjdsNM9FSoIblyDEvH/Slwc5bcsvG0nNllJn18K/G SENXiKJsGL2fjVcZHNlKiVsVd2y74bJBpPEDInRKl6YXXSrDGBdokO0N/SUisUADQqP+ ibxp35I1VTsgQJ+RMIvR35deHbNTSiPgjhrxJLu34n55Hlqe7zHyDOicDEjfLbL8tfs3 PJ8NFGb3ELbQzdefOhOfOIaXWU+TrMKYH16kPDK8AyqC3K87xWIrj6QNXmsaSqwpnwQp b+lw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z10si9421697ejg.497.2021.11.04.20.06.59; Thu, 04 Nov 2021 20:07:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231723AbhKEBtD (ORCPT + 99 others); Thu, 4 Nov 2021 21:49:03 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:15362 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231754AbhKEBtC (ORCPT ); Thu, 4 Nov 2021 21:49:02 -0400 Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Hljyp0lktz90VB; Fri, 5 Nov 2021 09:46:10 +0800 (CST) Received: from dggpeml500019.china.huawei.com (7.185.36.137) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.15; Fri, 5 Nov 2021 09:46:19 +0800 Received: from [10.174.179.189] (10.174.179.189) by dggpeml500019.china.huawei.com (7.185.36.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.15; Fri, 5 Nov 2021 09:46:18 +0800 Subject: Re: [PATCH RESEND] nbd: code clean for nbd_genl_status() To: Christoph Hellwig CC: , , , , , References: <1636000703-13217-1-git-send-email-wubo40@huawei.com> From: Wu Bo Message-ID: <6cdbd618-918a-3674-122f-039180ea316b@huawei.com> Date: Fri, 5 Nov 2021 09:46:18 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.2.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.179.189] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpeml500019.china.huawei.com (7.185.36.137) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/11/4 16:48, Christoph Hellwig wrote: > On Thu, Nov 04, 2021 at 12:38:23PM +0800, Wu Bo wrote: >> if (!reply_head) { >> - nlmsg_free(reply); >> goto out; >> } > > Please also drop the now pointless braces. > ok. Will do in v2. >> out: >> + if (reply) >> + nlmsg_free(reply); > > Please just use a different label for just unlocking vs also freeing > the reply. > . ok. Will do in v2. Thanks. Wu Bo