Commit ae1131d4 authored by Chuck Lever's avatar Chuck Lever

NFSD: Rename nfsd4_encode_fattr()

For better alignment with the specification, NFSD's encoder function
name should match the name of the XDR data type.
Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent fce7913b
...@@ -3471,10 +3471,10 @@ static const nfsd4_enc_attr nfsd4_enc_fattr4_encode_ops[] = { ...@@ -3471,10 +3471,10 @@ static const nfsd4_enc_attr nfsd4_enc_fattr4_encode_ops[] = {
* ourselves. * ourselves.
*/ */
static __be32 static __be32
nfsd4_encode_fattr(struct xdr_stream *xdr, struct svc_fh *fhp, nfsd4_encode_fattr4(struct svc_rqst *rqstp, struct xdr_stream *xdr,
struct svc_export *exp, struct svc_fh *fhp, struct svc_export *exp,
struct dentry *dentry, const u32 *bmval, struct dentry *dentry, const u32 *bmval,
struct svc_rqst *rqstp, int ignore_crossmnt) int ignore_crossmnt)
{ {
struct nfsd4_fattr_args args; struct nfsd4_fattr_args args;
struct svc_fh *tempfh = NULL; struct svc_fh *tempfh = NULL;
...@@ -3592,11 +3592,13 @@ nfsd4_encode_fattr(struct xdr_stream *xdr, struct svc_fh *fhp, ...@@ -3592,11 +3592,13 @@ nfsd4_encode_fattr(struct xdr_stream *xdr, struct svc_fh *fhp,
} }
#endif /* CONFIG_NFSD_V4_SECURITY_LABEL */ #endif /* CONFIG_NFSD_V4_SECURITY_LABEL */
/* attrmask */
status = nfsd4_encode_bitmap4(xdr, u.attrmask[0], status = nfsd4_encode_bitmap4(xdr, u.attrmask[0],
u.attrmask[1], u.attrmask[2]); u.attrmask[1], u.attrmask[2]);
if (status) if (status)
goto out; goto out;
/* attr_vals */
attrlen_offset = xdr->buf->len; attrlen_offset = xdr->buf->len;
attrlen_p = xdr_reserve_space(xdr, XDR_UNIT); attrlen_p = xdr_reserve_space(xdr, XDR_UNIT);
if (!attrlen_p) if (!attrlen_p)
...@@ -3656,8 +3658,8 @@ __be32 nfsd4_encode_fattr_to_buf(__be32 **p, int words, ...@@ -3656,8 +3658,8 @@ __be32 nfsd4_encode_fattr_to_buf(__be32 **p, int words,
__be32 ret; __be32 ret;
svcxdr_init_encode_from_buffer(&xdr, &dummy, *p, words << 2); svcxdr_init_encode_from_buffer(&xdr, &dummy, *p, words << 2);
ret = nfsd4_encode_fattr(&xdr, fhp, exp, dentry, bmval, rqstp, ret = nfsd4_encode_fattr4(rqstp, &xdr, fhp, exp, dentry, bmval,
ignore_crossmnt); ignore_crossmnt);
*p = xdr.p; *p = xdr.p;
return ret; return ret;
} }
...@@ -3716,8 +3718,8 @@ nfsd4_encode_dirent_fattr(struct xdr_stream *xdr, struct nfsd4_readdir *cd, ...@@ -3716,8 +3718,8 @@ nfsd4_encode_dirent_fattr(struct xdr_stream *xdr, struct nfsd4_readdir *cd,
} }
out_encode: out_encode:
nfserr = nfsd4_encode_fattr(xdr, NULL, exp, dentry, cd->rd_bmval, nfserr = nfsd4_encode_fattr4(cd->rd_rqstp, xdr, NULL, exp, dentry,
cd->rd_rqstp, ignore_crossmnt); cd->rd_bmval, ignore_crossmnt);
out_put: out_put:
dput(dentry); dput(dentry);
exp_put(exp); exp_put(exp);
...@@ -3961,8 +3963,9 @@ nfsd4_encode_getattr(struct nfsd4_compoundres *resp, __be32 nfserr, ...@@ -3961,8 +3963,9 @@ nfsd4_encode_getattr(struct nfsd4_compoundres *resp, __be32 nfserr,
struct svc_fh *fhp = getattr->ga_fhp; struct svc_fh *fhp = getattr->ga_fhp;
struct xdr_stream *xdr = resp->xdr; struct xdr_stream *xdr = resp->xdr;
return nfsd4_encode_fattr(xdr, fhp, fhp->fh_export, fhp->fh_dentry, /* obj_attributes */
getattr->ga_bmval, resp->rqstp, 0); return nfsd4_encode_fattr4(resp->rqstp, xdr, fhp, fhp->fh_export,
fhp->fh_dentry, getattr->ga_bmval, 0);
} }
static __be32 static __be32
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment