Received: by 2002:ab2:6f44:0:b0:1fd:c486:4f03 with SMTP id l4csp170059lqq; Wed, 12 Jun 2024 22:08:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUJb5B7Lxjlb0QPFWxbVfgQHWFGvWQxL4+qSjpWx/FvAhN0V2CO0mRCADb+9RgA4zWnFiiglLOXyN6Gq8sgFjkKws+EuFf/D/aRYxvNlw== X-Google-Smtp-Source: AGHT+IGXylm1OJyAeoNgaPk+1sFygPLMlYEx0L/qBpXDBfHTiHIRnqslMAQEOnSw3mZInbcj4sw8 X-Received: by 2002:a05:6830:22e4:b0:6f9:5c2b:9e0a with SMTP id 46e09a7af769-6fa1be42843mr4565110a34.4.1718255324137; Wed, 12 Jun 2024 22:08:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718255324; cv=pass; d=google.com; s=arc-20160816; b=jegUjqiXFJjUvyGMD1Lgjbu7nbb2MfuOIoX+uYN01PHoeMAFxZ/b5xaqFNUFpZ0f8K aDXfD5wtZhiwWuSqIDMk/ob8bCFuJy2hBW8I60fUXFUuJQ+vhHFcPKWjHUVa0UZHKDS/ saFeQ1qZ8f0QQgNwLyezU8qgkfGEG+ZM69YzTobxv6YU3zhxhg3vvDSLX4BeAfC1+Y5+ zVy4I/Gp3qjOYqckX+2y/eYUYjde0rOmSAMZKbC16ku0+L5yYnSWo3TKbybIVdiNZiL6 4sS5i1NhfVPiucWuNuairWDT1dLTJtmTj60MVNpUkF6bA2oRLyltksgyQu5NhCAGvz4M 7cHg== ARC-Message-Signature: i=2; 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 :date:subject:to:from:dkim-signature; bh=iy//GQLlcZ5aHkYIb8MscB8H27aF06UkdefW9lmLNCA=; fh=Mys3y4MwsHRytUQMpdfGBn3oGRYLcLloxNwkFYMYMmg=; b=XAms10POldUcDpemsiMuFJAvzKp+Gufz1rUFXhcQa+8grVWNzCDCRlQfUkAx5u/bLZ ELiApcSL9nfUDGhCw0LbsUgUKivrgbYaOnF/iEBzjcIfTSBmKRV9HUD9/k+8SBWcl/MI OH0lJD4NTinpapZR7mamQLaEOI2GS53Ktj9DccM2dBETl1d4UQFh8s/oupwKB6YTn5M9 qDNeiibPUZ7wVr9isfe60alWrmO4d+Ffyfe2/+HK3dtPfxnOHW7iNj4bcfcTT6V90fXO c1UeFVaxViY670ityxUMFIvw1ll1YWIV0HMfYnu66u/fBqW2fzwxZH1Ri+xbfNw1/IAM My+g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=JD2pCDVL; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-nfs+bounces-3732-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3732-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-6fee310ce02si572020a12.308.2024.06.12.22.08.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 22:08:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-3732-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=JD2pCDVL; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-nfs+bounces-3732-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3732-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 0238BB21BCB for ; Thu, 13 Jun 2024 05:07:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 30084135A4B; Thu, 13 Jun 2024 05:07:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JD2pCDVL" X-Original-To: linux-nfs@vger.kernel.org Received: from mail-qv1-f51.google.com (mail-qv1-f51.google.com [209.85.219.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B195313210A for ; Thu, 13 Jun 2024 05:07:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718255228; cv=none; b=DdpQaJQC4bbvMK7OyGlX9dlPwN1q6CVV73D0CDi95f18MxDnm7qzwxXNK/yU26cfJ7t/p1x/EaSrZ6UYnY32M9mVDkKhA2mU0wt73/9AJWzn2htn4OoNBbUR/lpGEEwqNXwASa8GziRsJmggcajEPjp0AJHbHcjvLUkF4oH+ru0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718255228; c=relaxed/simple; bh=CdANIOaNsG8iASQaX0gla21G3OnBWY7i2Ee32nL8g4g=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Jg4Np8GB3+juD6dtttD0jL0PoODRq/Ggfy4j4eaG+rNPMe04Wy9yxyy8eUvr14u1WpzaQSuQQUJMdB7RHDk2Ph31SIZ3l/RqF4TZM2kt+wPG1ql6Szww/V32OWrA8kMFmq1wrzLXrXxj2kQHXfiFbM4j9YuYvMiSwmuSA3j8hSc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=JD2pCDVL; arc=none smtp.client-ip=209.85.219.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qv1-f51.google.com with SMTP id 6a1803df08f44-6b06bdbf9fdso3568636d6.0 for ; Wed, 12 Jun 2024 22:07:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718255225; x=1718860025; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=iy//GQLlcZ5aHkYIb8MscB8H27aF06UkdefW9lmLNCA=; b=JD2pCDVLLZLdNHkkPZUU7xIYFxdQmQ9gZz1X+LLZV4i+eH8vJSazJnqyEUd4j/40Zx qrB5PWHtCnOW/gX9JY0DLo8+EMqu6B1toqunvoY+aCVG1OPjF86EXAlz3oWZugdYrzGR zGwF5whLcw2M3CaWVDv5UThekSiaGuRlJlBkxnJ4kq0KCC0sAARirXeUc+HRtp6yDkVp GOGaF21ReRauQIL3qPWSoeTrDsOQ9O9bX/wOUO+78RGq7/AIrMFGNzEQ0WH2hW5vcZRI nqkWpPpdOGyjxwxo7Ac9Ng1myVNddSuhGBuudbP24Bd3LZvT1uZkgOglE6T6tIjHA1Za 12Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718255225; x=1718860025; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iy//GQLlcZ5aHkYIb8MscB8H27aF06UkdefW9lmLNCA=; b=HT046dPbU9vDl0vPoh3hgadHOWzulwr+A59SeZp8V1IdSCGokgN+/z0r5KfEn1Va1D K78bJjk+yWk/io0fj+ndbY+DjUsEiQbBVmT4ClU45H1soMiAuNVex00QEnU/Xr7meA6R HCzHp8bZVitNcdaJsuCSNLzsohHH+WdQCoPvYt6KUsuj4OQ0XfBzAQITkxraaEKyPEwT ZuPGTJ0j17U791QoxgutMFrNHv1QSmUN/WuvPrQABG483V/cNvyPQtCMpEO3YQF24KZj LAqFWe2qybDsJR3tVoTJEhlcuzz2JHf5UjVaS/cY2PZHJilLM/niJD5IpEAFTtfMcYfw S6Gg== X-Gm-Message-State: AOJu0Yyzn5bmIeyVJZjn8lfVMan8KSHN4Aah3OcJDW06fCcT2fCtBFxw llVK/gChR1uuGmiWqXC7RYWp99YC7ZTS7x7E4bvW/MJ+llTClYr7C/Lx X-Received: by 2002:ad4:4484:0:b0:6b1:e371:99d9 with SMTP id 6a1803df08f44-6b1e3719b2dmr31717346d6.8.1718255225197; Wed, 12 Jun 2024 22:07:05 -0700 (PDT) Received: from leira.trondhjem.org (c-68-40-188-158.hsd1.mi.comcast.net. [68.40.188.158]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6b2a5ed4527sm3079036d6.101.2024.06.12.22.07.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 22:07:04 -0700 (PDT) From: trondmy@gmail.com X-Google-Original-From: trond.myklebust@hammerspace.com To: linux-nfs@vger.kernel.org Subject: [PATCH 03/11] NFSv4: Clean up encode_nfs4_stateid() Date: Thu, 13 Jun 2024 01:00:47 -0400 Message-ID: <20240613050055.854323-4-trond.myklebust@hammerspace.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240613050055.854323-3-trond.myklebust@hammerspace.com> References: <20240613050055.854323-1-trond.myklebust@hammerspace.com> <20240613050055.854323-2-trond.myklebust@hammerspace.com> <20240613050055.854323-3-trond.myklebust@hammerspace.com> Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Trond Myklebust Ensure that we encode the actual stateid, and not any metadata. Signed-off-by: Trond Myklebust --- fs/nfs/nfs4xdr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 4bf7d5c09282..7704a4509676 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c @@ -1067,9 +1067,10 @@ static void encode_nops(struct compound_hdr *hdr) *hdr->nops_p = htonl(hdr->nops); } -static void encode_nfs4_stateid(struct xdr_stream *xdr, const nfs4_stateid *stateid) +static void encode_nfs4_stateid(struct xdr_stream *xdr, + const nfs4_stateid *stateid) { - encode_opaque_fixed(xdr, stateid, NFS4_STATEID_SIZE); + encode_opaque_fixed(xdr, stateid->data, NFS4_STATEID_SIZE); } static void encode_nfs4_verifier(struct xdr_stream *xdr, const nfs4_verifier *verf) -- 2.45.2