Subject: Re: [PATCH v5 2/3] NFSD: convert write_version to netlink command

From: Jakub Kicinski <[email-masked]>
Date: Wed, 29 Nov 2023 16:28:32 -0800

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);
> +		}
> +	}