Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4960636rdh; Wed, 29 Nov 2023 16:28:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IFL2RXJyKxEfGinWBRoaLx1VjlxHZ0oibK3AJGhPHw+tEtQx4g6Gje+BuNz/WaAyTHlUQBe X-Received: by 2002:a05:6a20:548e:b0:18c:8d0f:a794 with SMTP id i14-20020a056a20548e00b0018c8d0fa794mr13670875pzk.19.1701304123238; Wed, 29 Nov 2023 16:28:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701304123; cv=none; d=google.com; s=arc-20160816; b=rgVK5WNZnQpnHhN6BfGAayf5NMIJDEFsdmsVas2AtVzsKg/XprPQwVR19agRHSVPIa R0zk4N4EeZAOwdU7D0ci/trhCq4b/IZbc5bvNg1WlnB+9wW7c9+wHKQdHWJnqtoYeKKp PINYT1kETW3RQrC7clxgHv8p0RPkT0cL/GY13/aRPQ2ybg+rHlnLYYDqeIfoQsL45h9R lY+APMRs/d8nJ2ZHV2zWujz1JLAU9IQ9qLvxWpqnMPtXC3iLUS80FjpIofmUxrPcwixh 9tgVyvsP1CfS8oKfeWOXV4ejKdNEoMp+7gJ+YPS4fKxSQbN5G54B9V3iQJmwFiqS0fVJ s6EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=n1g470RkThsCDqO/qfb9Q1qTG17j1clAkoV2DpxhlqA=; fh=tv7lyJZ/AToP3nPck4FJL05xmwCglEkAtFAjmW3q62A=; b=J1bY8iTHVu/VMh9aQzm/1FvcMe8ylU4VMOwwN3N9FTRdE6BTI1qZI8LidqGngrWuK1 iAAvYDQgg0MY+YoAXDfI54ThgqLVO7QzH6Krnw7Q1+wWDrhTmQN6Yh9+2Wh9lrC6nYDG 9BDRfeFlBtx2a0eBJXeXOw3dMK1EGu3dcOXAXtdaWEhDuxDUgObMgzRlyIFy/OwI7C94 JQqXUuKtA2lZFP86GiK1RGnxcxoPoCCWnZF3hfvptW4Gep1fXfmCCrF2BEXaRsZvMQjS 5wBMLDTyeo6WrFpDLAROVeEVG27qdvCwL8/oy24nno5DiIq/+0CFI8JH/blJW15baG+w HXjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=A0RxJBOp; spf=pass (google.com: domain of linux-nfs+bounces-181-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-181-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id u11-20020a056a00124b00b006be3c302801si15431831pfi.397.2023.11.29.16.28.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 16:28:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs+bounces-181-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=A0RxJBOp; spf=pass (google.com: domain of linux-nfs+bounces-181-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-181-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 1A65FB20D87 for ; Thu, 30 Nov 2023 00:28:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F31E5386; Thu, 30 Nov 2023 00:28:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="A0RxJBOp" X-Original-To: linux-nfs@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D28DF180; Thu, 30 Nov 2023 00:28:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 123FDC433C8; Thu, 30 Nov 2023 00:28:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701304114; bh=fTSuT5wA8dpg7BcKfttSF75nApcqaZadiuhJ8Et0cNQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=A0RxJBOpzFknhyJF6QWAhp/TTPuiExYeK3Hq75s9+XbWvvLBESysNUt4Rvt8Px5De /h6VH/YQuPL7KN/3s8hFwiRdjjtjOsx0vPRPRgr4wB66eXNVbh1TTEaEbdln8nRTO2 HIkBDEO9UW+6TJTHNDCzym17HmnHugiZFodM8nIPusM6Oxfhg34YOSw1XWa3xQ+tKa WM6Cl39XoqeUUzGAKfSTF18irqsNR8akjzMwizLGMfvKnvghnnKj3pltZcoZT0O/ur 0floqKQgUzPvl4ns8AuYegwvea3aVymSs1TKa2l9f4ctRt480K3TulA6ton34NXzUK 0ke09jVFg9Www== Date: Wed, 29 Nov 2023 16:28:32 -0800 From: Jakub Kicinski To: Lorenzo Bianconi Cc: linux-nfs@vger.kernel.org, lorenzo.bianconi@redhat.com, neilb@suse.de, netdev@vger.kernel.org, jlayton@kernel.org Subject: Re: [PATCH v5 2/3] NFSD: convert write_version to netlink command Message-ID: <20231129162832.4b36f96b@kernel.org> In-Reply-To: <8b47d2e3f704066204149653fd1bd86a64188f61.1701277475.git.lorenzo@kernel.org> References: <8b47d2e3f704066204149653fd1bd86a64188f61.1701277475.git.lorenzo@kernel.org> Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 29 Nov 2023 18:12:44 +0100 Lorenzo Bianconi wrote: > + - > + name: status > + type: u8 u8? I guess... > +/** > + * nfsd_nl_version_get_doit - Handle verion_get dumpit doesn't match the function name (do -> dump) > + /* NFSv{2,3} does not support minor numbers */ > + if (i < 4 && j) > + continue; > + > + if (i == 4 && !nfsd_minorversion(nn, j, NFSD_TEST)) > + continue; > + > + hdr = genlmsg_put(skb, NETLINK_CB(cb->skb).portid, > + cb->nlh->nlmsg_seq, &nfsd_nl_family, > + 0, NFSD_CMD_VERSION_GET); Why not iput()? > + if (!hdr) > + goto out; > + > + if (nla_put_u32(skb, NFSD_A_SERVER_VERSION_MAJOR, i) || > + nla_put_u32(skb, NFSD_A_SERVER_VERSION_MINOR, j)) > + goto out; > + > + genlmsg_end(skb, hdr); > + } > + }