summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2020-11-04 15:01:24 -0500
committerChuck Lever <chuck.lever@oracle.com>2020-11-30 14:46:37 -0500
commit5c505d128691c70991b766dd6a3faf49fa59ecfb (patch)
treec872d9049fd8b9b2a8a5354152b5278e227c3fcf
parentf759eff260f1f0b0f56531517762f27ee3233506 (diff)
NFSD: Replace READ* macros in nfsd4_decode_link()
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
-rw-r--r--fs/nfsd/nfs4xdr.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 6f32901f8048..59f091f9e237 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -779,16 +779,7 @@ nfsd4_decode_getattr(struct nfsd4_compoundargs *argp, struct nfsd4_getattr *geta
static __be32
nfsd4_decode_link(struct nfsd4_compoundargs *argp, struct nfsd4_link *link)
{
- DECODE_HEAD;
-
- READ_BUF(4);
- link->li_namelen = be32_to_cpup(p++);
- READ_BUF(link->li_namelen);
- SAVEMEM(link->li_name, link->li_namelen);
- if ((status = check_filename(link->li_name, link->li_namelen)))
- return status;
-
- DECODE_TAIL;
+ return nfsd4_decode_component4(argp, &link->li_name, &link->li_namelen);
}
static __be32