Skip to content

Commit a0f3c83

Browse files
committed
NFSD: Rename nfsd4_encode_dirent()
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. Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
1 parent 6621b88 commit a0f3c83

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

fs/nfsd/nfs4xdr.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3674,8 +3674,8 @@ static inline int attributes_need_mount(u32 *bmval)
36743674
}
36753675

36763676
static __be32
3677-
nfsd4_encode_dirent_fattr(struct xdr_stream *xdr, struct nfsd4_readdir *cd,
3678-
const char *name, int namlen)
3677+
nfsd4_encode_entry4_fattr(struct nfsd4_readdir *cd, const char *name,
3678+
int namlen)
36793679
{
36803680
struct svc_export *exp = cd->rd_fhp->fh_export;
36813681
struct dentry *dentry;
@@ -3718,7 +3718,7 @@ nfsd4_encode_dirent_fattr(struct xdr_stream *xdr, struct nfsd4_readdir *cd,
37183718

37193719
}
37203720
out_encode:
3721-
nfserr = nfsd4_encode_fattr4(cd->rd_rqstp, xdr, NULL, exp, dentry,
3721+
nfserr = nfsd4_encode_fattr4(cd->rd_rqstp, cd->xdr, NULL, exp, dentry,
37223722
cd->rd_bmval, ignore_crossmnt);
37233723
out_put:
37243724
dput(dentry);
@@ -3744,7 +3744,7 @@ nfsd4_encode_rdattr_error(struct xdr_stream *xdr, __be32 nfserr)
37443744
}
37453745

37463746
static int
3747-
nfsd4_encode_dirent(void *ccdv, const char *name, int namlen,
3747+
nfsd4_encode_entry4(void *ccdv, const char *name, int namlen,
37483748
loff_t offset, u64 ino, unsigned int d_type)
37493749
{
37503750
struct readdir_cd *ccd = ccdv;
@@ -3781,7 +3781,7 @@ nfsd4_encode_dirent(void *ccdv, const char *name, int namlen,
37813781
p = xdr_encode_hyper(p, OFFSET_MAX); /* offset of next entry */
37823782
p = xdr_encode_array(p, name, namlen); /* name length & name */
37833783

3784-
nfserr = nfsd4_encode_dirent_fattr(xdr, cd, name, namlen);
3784+
nfserr = nfsd4_encode_entry4_fattr(cd, name, namlen);
37853785
switch (nfserr) {
37863786
case nfs_ok:
37873787
break;
@@ -4493,9 +4493,8 @@ nfsd4_encode_readdir(struct nfsd4_compoundres *resp, __be32 nfserr,
44934493
readdir->cookie_offset = 0;
44944494

44954495
offset = readdir->rd_cookie;
4496-
nfserr = nfsd_readdir(readdir->rd_rqstp, readdir->rd_fhp,
4497-
&offset,
4498-
&readdir->common, nfsd4_encode_dirent);
4496+
nfserr = nfsd_readdir(readdir->rd_rqstp, readdir->rd_fhp, &offset,
4497+
&readdir->common, nfsd4_encode_entry4);
44994498
if (nfserr == nfs_ok &&
45004499
readdir->common.err == nfserr_toosmall &&
45014500
xdr->buf->len == starting_len + 8) {

0 commit comments

Comments
 (0)