diff options
author | 2020-11-04 15:05:58 -0500 | |
---|---|---|
committer | 2020-11-30 14:46:39 -0500 | |
commit | ba881a0a5342b3aaf83958901ebe3fe752eaab46 (patch) | |
tree | fe123093afd0bf03c2c57aebf10e465140cd262d /fs | |
parent | NFSD: Replace READ* macros in nfsd4_decode_remove() (diff) | |
download | linux-ba881a0a5342b3aaf83958901ebe3fe752eaab46.tar.gz linux-ba881a0a5342b3aaf83958901ebe3fe752eaab46.tar.bz2 linux-ba881a0a5342b3aaf83958901ebe3fe752eaab46.zip |
NFSD: Replace READ* macros in nfsd4_decode_rename()
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfsd/nfs4xdr.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 71409a70ef08..08b909bca6b5 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -1261,22 +1261,12 @@ nfsd4_decode_remove(struct nfsd4_compoundargs *argp, struct nfsd4_remove *remove static __be32 nfsd4_decode_rename(struct nfsd4_compoundargs *argp, struct nfsd4_rename *rename) { - DECODE_HEAD; + __be32 status; - READ_BUF(4); - rename->rn_snamelen = be32_to_cpup(p++); - READ_BUF(rename->rn_snamelen); - SAVEMEM(rename->rn_sname, rename->rn_snamelen); - READ_BUF(4); - rename->rn_tnamelen = be32_to_cpup(p++); - READ_BUF(rename->rn_tnamelen); - SAVEMEM(rename->rn_tname, rename->rn_tnamelen); - if ((status = check_filename(rename->rn_sname, rename->rn_snamelen))) - return status; - if ((status = check_filename(rename->rn_tname, rename->rn_tnamelen))) + status = nfsd4_decode_component4(argp, &rename->rn_sname, &rename->rn_snamelen); + if (status) return status; - - DECODE_TAIL; + return nfsd4_decode_component4(argp, &rename->rn_tname, &rename->rn_tnamelen); } static __be32 |