summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2020-11-04 15:02:40 -0500
committerChuck Lever <chuck.lever@oracle.com>2020-11-30 14:46:38 -0500
commit3d5877e8e03f60d7cc804d7b230ff9c00c9c07bd (patch)
tree7fde0a60ce8310a14695e7112b25d17c9524c28d /fs
parentca9cf9fc27f8f722e9eb2763173ba01f6ac3dad1 (diff)
NFSD: Replace READ* macros in nfsd4_decode_lookup()
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs')
-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 d02b3ac71ccd..893db985c927 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -931,16 +931,7 @@ nfsd4_decode_locku(struct nfsd4_compoundargs *argp, struct nfsd4_locku *locku)
static __be32
nfsd4_decode_lookup(struct nfsd4_compoundargs *argp, struct nfsd4_lookup *lookup)
{
- DECODE_HEAD;
-
- READ_BUF(4);
- lookup->lo_len = be32_to_cpup(p++);
- READ_BUF(lookup->lo_len);
- SAVEMEM(lookup->lo_name, lookup->lo_len);
- if ((status = check_filename(lookup->lo_name, lookup->lo_len)))
- return status;
-
- DECODE_TAIL;
+ return nfsd4_decode_component4(argp, &lookup->lo_name, &lookup->lo_len);
}
static __be32 nfsd4_decode_share_access(struct nfsd4_compoundargs *argp, u32 *share_access, u32 *deleg_want, u32 *deleg_when)