Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp204754rdb; Thu, 30 Nov 2023 02:32:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IED+p1Lj+uLQQn+dCRdgXirNe+dPD6WIqxZZ5Fwc/45rIWrcLVK3V7xqQM3NEXNOPjDVXFt X-Received: by 2002:a05:6a00:2791:b0:6c4:cf33:cbe8 with SMTP id bd17-20020a056a00279100b006c4cf33cbe8mr20017468pfb.6.1701340348130; Thu, 30 Nov 2023 02:32:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701340348; cv=none; d=google.com; s=arc-20160816; b=wgG5lzAgguLOwgJmgQ0uTwlsl9FzpxD7BLox1WN1vP/riudfYlGOHF0yqbi0RAmvn0 YP5peKvAs4hRdpUD3TpBtvFJfjoNPq7gKQtC2sbKU9EEW8pg6avyZSBQD2wu6ajF90y9 Bjq+4WKL9fBbUW5DR6CXsaFHL6DtA0LOiPWXG/q8q7G1XBG/5SVO5w4i7WIby3tgYVpo 8sVqwUbwArAk9sDp3J8XdkgtbuVODkutQ4ld4AR53wN7w70a0KuXzbVDL7wZ9PBBbI/2 f0z8RAOwAyc03W7aD3B/YJkyijq5v6CtmlnoGJmnE6Fumz4boplnDAj4UDF0/m/E8tcZ BZtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ZsgkCLC7v8CgHD+eh5IXJNdOt/HNTiwiUOoVjoqTu/I=; fh=R+goM2pu2fH8X7xtKfQcGEnuFyC3K3T+AnIF5hchq2s=; b=lHvtk/zTHobQ/GU6RAmXBg8ELCLlz604/cA6NQjN3/k42S8aFR3/MBCkBdxHYFlPIl vkVgF5h+9e4KKV2l/LCzU35tiDHjKvDfvVRYpvX4C31kzC6K3geiBalfG7cdjGoejwe5 bvZUjH7JZkirNVXwCEUqUtHa60e1HHSLWLYvH6A6H+1xpnd/kLUSDHKEWhzt/fy4ZrLS bE64MXSOvCENiYNs/1ZdZx9Uku3cotoTXNmedJZGHWXvb+F+N9Rjst2HK8LajfhMIhG7 o70JVOuVcKN6Q+pyfGGM7fT6+vAxc7OowNY4H7liVLXZOrmVWdLHJFm2WeEdQR7gIyu0 FJFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LcLfdoSU; spf=pass (google.com: domain of linux-nfs+bounces-194-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-194-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 72-20020a63014b000000b005c21c4a46ddsi1028698pgb.356.2023.11.30.02.32.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 02:32:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs+bounces-194-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=LcLfdoSU; spf=pass (google.com: domain of linux-nfs+bounces-194-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-194-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 CE861B20EDC for ; Thu, 30 Nov 2023 10:32:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6CBE41DDC7; Thu, 30 Nov 2023 10:32:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LcLfdoSU" 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 486FD3C073; Thu, 30 Nov 2023 10:32:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 53103C433C7; Thu, 30 Nov 2023 10:32:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701340340; bh=HOjF+ggEGZVQckUoqiyH9FoyAEK63YTupFSMkKbKimU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LcLfdoSU1zOGHdZ/HTs1NAUSyqpVBXd4pL2J+DmFSOjBcTFy5YC+nkAFssnB29WyX fsmgoFdUC7k+EAr8omZrGfgPB2AsChEc/xNf8vE0vjT4Dgs2HebR2gF3v9Qbu7MF/J OrHXpfWo4j97lMHmzwAmm8Q3D8cP7jHgNIck6jbEUaZAVbTQglh5kjXfEHB2OtRoSE f8oDGk1njXU607fNKWu5xmAhS4dQhtqZm4F2CBuJogKyf8R7tqjzvTIDn22go/pBKh llpAuT2SrY0V1UbEGXXTdNDeaLN/FkJ+lwbVLxEMYMEia3+XVUYFTibMnNAyYW8Yvt SNEq3C32na2EQ== Date: Thu, 30 Nov 2023 11:32:17 +0100 From: Lorenzo Bianconi To: Jakub Kicinski 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: References: <8b47d2e3f704066204149653fd1bd86a64188f61.1701277475.git.lorenzo@kernel.org> <20231129162832.4b36f96b@kernel.org> Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="i0RPUHzhMsRv9aFE" Content-Disposition: inline In-Reply-To: <20231129162832.4b36f96b@kernel.org> --i0RPUHzhMsRv9aFE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > On Wed, 29 Nov 2023 18:12:44 +0100 Lorenzo Bianconi wrote: > > + - > > + name: status > > + type: u8 >=20 > u8? I guess... here we need just 0 or 1 I would say. Do you suggest create something like = an enum? > > +/** > > + * nfsd_nl_version_get_doit - Handle verion_get dumpit >=20 > doesn't match the function name (do -> dump) ack, I will fix it. >=20 > > + /* NFSv{2,3} does not support minor numbers */ > > + if (i < 4 && j) > > + continue; > > + > > + if (i =3D=3D 4 && !nfsd_minorversion(nn, j, NFSD_TEST)) > > + continue; > > + > > + hdr =3D genlmsg_put(skb, NETLINK_CB(cb->skb).portid, > > + cb->nlh->nlmsg_seq, &nfsd_nl_family, > > + 0, NFSD_CMD_VERSION_GET); >=20 > Why not iput()? ack, I will fix it. Regards, Lorenzo >=20 > > + 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); > > + } > > + } >=20 --i0RPUHzhMsRv9aFE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQTquNwa3Txd3rGGn7Y6cBh0uS2trAUCZWhksAAKCRA6cBh0uS2t rMT+AP9Cg3y7E22p898lhYFQsmWgouk4y5paFB9vbTxLwIullAEAz/AhE01+XzAD DNcVda0rXXEIIFxtUvrJAnDnR2Sragc= =YDI6 -----END PGP SIGNATURE----- --i0RPUHzhMsRv9aFE--