NFSv4.2: Ensure we always reset the result->count in decode_read_plus()

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
Trond Myklebust 2020-12-08 13:11:11 -05:00
parent 5802f7c2a6
commit 1ee6310119
1 changed files with 1 additions and 0 deletions

View File

@ -1087,6 +1087,7 @@ static int decode_read_plus(struct xdr_stream *xdr, struct nfs_pgio_res *res)
if (unlikely(!p))
return -EIO;
res->count = 0;
eof = be32_to_cpup(p++);
segments = be32_to_cpup(p++);
if (segments == 0)