NFSD: Replace READ* macros that decode the fattr4 mode attribute
[ Upstream commit 1c8f0ad7dd35fd12307904036c7c839f77b6e3f9 ] Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
9887990f86
commit
502e31b392
1 changed files with 5 additions and 2 deletions
|
@ -351,8 +351,11 @@ nfsd4_decode_fattr(struct nfsd4_compoundargs *argp, u32 *bmval,
|
||||||
} else
|
} else
|
||||||
*acl = NULL;
|
*acl = NULL;
|
||||||
if (bmval[1] & FATTR4_WORD1_MODE) {
|
if (bmval[1] & FATTR4_WORD1_MODE) {
|
||||||
READ_BUF(4);
|
u32 mode;
|
||||||
iattr->ia_mode = be32_to_cpup(p++);
|
|
||||||
|
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_mode &= (S_IFMT | S_IALLUGO);
|
||||||
iattr->ia_valid |= ATTR_MODE;
|
iattr->ia_valid |= ATTR_MODE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue