Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1418187pxb; Thu, 4 Nov 2021 01:49:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFNcN22ncG+95e/TV5fFXrMaASkxbveQUjAm5jCteT2+WZGIx3CrvPWFzbrhYS0ABX6b7+ X-Received: by 2002:a05:6638:4193:: with SMTP id az19mr2828311jab.39.1636015793411; Thu, 04 Nov 2021 01:49:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636015793; cv=none; d=google.com; s=arc-20160816; b=z1l05IpYf928veEIAxbRfaAMNjMpd7GihBv8uODpkRncj+PvFrzlNZ5ms7V6myXMEx BfiOAMZIRahFfDhCB7sXirdrv5xpUG7uECZ6zXyxY/8NFt0lknqrjdzXjZRt6UyL4nma N8YWHCztfKA7cjeMOehtcuzB3UWEBcPiL5Bvm1J0hfKM8HDkloEUha+WG6U/jqsC0wdD wG+phDRJKUf49QA0QX7/b26dWOr3JD22Sp+E2FMg4FwFmPb9oGn+JhL2G0UzH9zjryAg z5zUZOPDTgx6U+fuZ8jxAjYOzNJbl20BtM0tg3EEN7kEKuUOrH998UR67HXO/8AvSTJr 4rVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=9gP1LH3zvKAxABcAWtH7DhuMpE09FrjJbNcq52Qoyns=; b=ityXsrCLWn1mr2yH8/ozJ5ys/cTFaPfQcpJWexYoQZJIBBCOpcj8SEGWYGxKsixnE1 ESdNCrjEyTtHMbepsCMT7vOwVYM9APpBJL/SjVAlkdqxLd6MRqRv/OB/eGgsfPT4kSEZ 4O6U8ZPS02Haf+L6/MCK9zPuyl2oPe6v3wEZAAvXGhjFL/Dk0aM8D+aocRGwLM0FJIRL jLD/RInEjNZD+qS+G+X4YRLRPkgkZVjNp3ZMKgfUOwqi87K79nJeKoYO97y3KrBSB1zU nT7sKTw3DlCMUI22tbP0m+OdYNq/IVdWROh9YEKLQ4HHWSzXIcpQUoUUSIIXYSKxiPSG BJcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=VEicMkJm; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t34si8580930jal.104.2021.11.04.01.49.40; Thu, 04 Nov 2021 01:49:53 -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; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=VEicMkJm; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230329AbhKDIvP (ORCPT + 99 others); Thu, 4 Nov 2021 04:51:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230084AbhKDIvP (ORCPT ); Thu, 4 Nov 2021 04:51:15 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BC15C061714; Thu, 4 Nov 2021 01:48:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=9gP1LH3zvKAxABcAWtH7DhuMpE09FrjJbNcq52Qoyns=; b=VEicMkJmVu4TUtSAdkL2uU9Y1M H49HBUXnvi/DvDCoWd2Bd520qo68O1PxCcfwpkPK8V1OZBn3DAMPjLdnNNfzYszLjIIl884Gu65tH 54kHzCy2KT/2YdrTfGoLtU7i395huQI/fJoyYmvnr1JB11gzEyX++ziBAoulmwMnKmbOIpiT9NB4L gOXmYWFIpL6GuLs/y/UG2imcsSste6LVP52vrRWdvjCDWNJZXgGd3kgS9GAByKChjdoO0enzxetoB 4reePckn/6fVC10fXbfpWTciKYnyD0tnXUEsTi6bLyyI6BMqtkV6s1RQ8Y/G2N7o025+Y4pIKFTyY 7z8VUWKg==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1miYQF-008MKw-9T; Thu, 04 Nov 2021 08:48:35 +0000 Date: Thu, 4 Nov 2021 01:48:35 -0700 From: Christoph Hellwig To: Wu Bo Cc: josef@toxicpanda.com, axboe@kernel.dk, linux-block@vger.kernel.org, nbd@other.debian.org, linux-kernel@vger.kernel.org, linfeilong@huawei.com Subject: Re: [PATCH RESEND] nbd: code clean for nbd_genl_status() Message-ID: References: <1636000703-13217-1-git-send-email-wubo40@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1636000703-13217-1-git-send-email-wubo40@huawei.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > out: > + if (reply) > + nlmsg_free(reply); Please just use a different label for just unlocking vs also freeing the reply.