Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2614390rdb; Wed, 4 Oct 2023 06:42:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGflyMhmXniJPrjxjXJw5P02hy8mYpfyBabZrM7YFuZNrBovib64MVewEYvXG7hLjT5EaZH X-Received: by 2002:a17:903:456:b0:1c6:19db:7b69 with SMTP id iw22-20020a170903045600b001c619db7b69mr2331136plb.66.1696426933004; Wed, 04 Oct 2023 06:42:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696426932; cv=none; d=google.com; s=arc-20160816; b=Gd78PeNtvb5gm4JFxlvyN1G/jHy+/QOiVfIJ11HUkDGf8pvto8JCMFop8Iz6FPVfHI PZUFF7t15p1o1Or9O5kQKOSh/mzFahBJbmTtwm2TOOsEzMW3HpTc5dhRprZLYaZ7Yjzj oLP/N4X/DUbqbPHafv88p0uY0dylUItwkuRcMyChRR4h2e5SXBndCb+hrvA8a2QvEEfd ofyf2KAWiH2/pCDKMWF0ZTe1XILmq6RDr/Gu+yfc6M6nSkt1mhhlf031zor7P4qwOsEz ACK2BxBhDvsgJK3C/8raWVfh8yO8l+iZVmWsGPzV7RfBGfFd/ZbrGjiIS3/qO9qPYG0O 9NuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:cc:to:from :subject:dkim-signature; bh=ckdjsxZ9jFZatJ8+RvffRr8d0y6rjxazn1/e0PrMnbM=; fh=v8a13lpFSZWlL4AptTEJnmXnlqoWXhGCGCgvrcnCT9I=; b=CH64WEVuSr3zw+h4SHHehRWex19dxmOGD3bNy3IcC855p2RKKJP2cd/891s6PU4syZ xBB3nHBF9ZO16n/hrzdcTc4vP/eBF0GemvKQhAEhHRtEzPUxKbZ6InM2zGYXRlrGiAc5 0ZgOMn/hWBiHowGisI4lSz0BzgLdDXFuOdVLBa2M2rnryV8wdtl1570J6LX+z5RWeJeP H6I6y69pYcaQPs4jLLfDYOx7e4dXsN+W6IUcjPzUbs7sE3sCBRNFE9UgPFDcOIExgEbX +8m9bg4hFM6p0ySQ+uIrBbHu/qu/AmYRRE8/F74gUR+Ytyp9XcfpBLoTUp5C8CUL0rPv ZKMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=X4aHUNpw; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id c18-20020a170903235200b001bf88e777f9si4175486plh.33.2023.10.04.06.42.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 06:42:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=X4aHUNpw; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id D21A981A6C2E; Wed, 4 Oct 2023 06:42:08 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233066AbjJDNlt (ORCPT + 99 others); Wed, 4 Oct 2023 09:41:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233255AbjJDNlt (ORCPT ); Wed, 4 Oct 2023 09:41:49 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F3989B for ; Wed, 4 Oct 2023 06:41:46 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BECEDC433C8; Wed, 4 Oct 2023 13:41:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696426906; bh=Z2+uKJSDcWzdABCM+PJV9Cu3GHRam6rVRAWlWfgswxc=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=X4aHUNpwEsLLyDYs4JScHoF6cTpuwiynkfyjz7Jtyij61SkV8ZXeYcUu8bP+IBIHi 9ixc5A9BYEbgB1MZRnrCWAdy4p97gDPv59Kh5V0OMjUUKKm3nQvme5qTB67mEWg7Zm 2bUto5W+/NuC3YdgD9WEjy82HsZkOFW8znB/OtTT6kmMRQBKnRwlxfcRzoBI+dqk8z CfdwUV7d7nmIDZQBH9A9sQYewBUTZ4WUHa0zwLefAMAoiB9r0TMvraB0Cjb64nvDQG jfwo61us1MgW3yLnqaXKZkUydF6asTq1T3xm4+iu/pdnTrm0SQdJCKwveG2KX9v0jR jLXvfD5nixT1A== Subject: [PATCH v1 1/5] NFSD: Rename nfsd4_encode_dirent() From: Chuck Lever To: linux-nfs@vger.kernel.org Cc: Chuck Lever Date: Wed, 04 Oct 2023 09:41:44 -0400 Message-ID: <169642690474.7503.14994605453994505408.stgit@klimt.1015granger.net> In-Reply-To: <169642681764.7503.2925922561588558142.stgit@klimt.1015granger.net> References: <169642681764.7503.2925922561588558142.stgit@klimt.1015granger.net> User-Agent: StGit/1.5 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 04 Oct 2023 06:42:09 -0700 (PDT) From: Chuck Lever Rename nfsd4_encode_dirent() to match the naming convention already used in the NFSv2 and NFSv3 readdir paths. The new name reflects the name of the spec-defined XDR data type for an NFSv4 directory entry. Signed-off-by: Chuck Lever --- fs/nfsd/nfs4xdr.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index f1f0b707c7d9..a6b6ff5819e9 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -3670,8 +3670,8 @@ static inline int attributes_need_mount(u32 *bmval) } static __be32 -nfsd4_encode_dirent_fattr(struct xdr_stream *xdr, struct nfsd4_readdir *cd, - const char *name, int namlen) +nfsd4_encode_entry4_fattr(struct nfsd4_readdir *cd, const char *name, + int namlen) { struct svc_export *exp = cd->rd_fhp->fh_export; struct dentry *dentry; @@ -3714,7 +3714,7 @@ nfsd4_encode_dirent_fattr(struct xdr_stream *xdr, struct nfsd4_readdir *cd, } out_encode: - nfserr = nfsd4_encode_fattr4(cd->rd_rqstp, xdr, NULL, exp, dentry, + nfserr = nfsd4_encode_fattr4(cd->rd_rqstp, cd->xdr, NULL, exp, dentry, cd->rd_bmval, ignore_crossmnt); out_put: dput(dentry); @@ -3740,7 +3740,7 @@ nfsd4_encode_rdattr_error(struct xdr_stream *xdr, __be32 nfserr) } static int -nfsd4_encode_dirent(void *ccdv, const char *name, int namlen, +nfsd4_encode_entry4(void *ccdv, const char *name, int namlen, loff_t offset, u64 ino, unsigned int d_type) { struct readdir_cd *ccd = ccdv; @@ -3777,7 +3777,7 @@ nfsd4_encode_dirent(void *ccdv, const char *name, int namlen, p = xdr_encode_hyper(p, OFFSET_MAX); /* offset of next entry */ p = xdr_encode_array(p, name, namlen); /* name length & name */ - nfserr = nfsd4_encode_dirent_fattr(xdr, cd, name, namlen); + nfserr = nfsd4_encode_entry4_fattr(cd, name, namlen); switch (nfserr) { case nfs_ok: break; @@ -4489,9 +4489,8 @@ nfsd4_encode_readdir(struct nfsd4_compoundres *resp, __be32 nfserr, readdir->cookie_offset = 0; offset = readdir->rd_cookie; - nfserr = nfsd_readdir(readdir->rd_rqstp, readdir->rd_fhp, - &offset, - &readdir->common, nfsd4_encode_dirent); + nfserr = nfsd_readdir(readdir->rd_rqstp, readdir->rd_fhp, &offset, + &readdir->common, nfsd4_encode_entry4); if (nfserr == nfs_ok && readdir->common.err == nfserr_toosmall && xdr->buf->len == starting_len + 8) {