Commit 1c8f0ad7 authored by Chuck Lever's avatar Chuck Lever

NFSD: Replace READ* macros that decode the fattr4 mode attribute

Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent c941a968
......@@ -351,8 +351,11 @@ nfsd4_decode_fattr(struct nfsd4_compoundargs *argp, u32 *bmval,
} else
*acl = NULL;
if (bmval[1] & FATTR4_WORD1_MODE) {
READ_BUF(4);
iattr->ia_mode = be32_to_cpup(p++);
u32 mode;
if (xdr_stream_decode_u32(argp->xdr, &mode) < 0)
return nfserr_bad_xdr;
iattr->ia_mode = mode;
iattr->ia_mode &= (S_IFMT | S_IALLUGO);
iattr->ia_valid |= ATTR_MODE;
}
......
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