From: Trond Myklebust Date: Tue, 8 Dec 2020 18:11:11 +0000 (-0500) Subject: NFSv4.2: Ensure we always reset the result->count in decode_read_plus() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=1ee6310119a5b4460324111a8c4536054356b963;p=linux.git NFSv4.2: Ensure we always reset the result->count in decode_read_plus() Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/nfs42xdr.c b/fs/nfs/nfs42xdr.c index c0b8fcd266c98..1c21db640f4d9 100644 --- a/fs/nfs/nfs42xdr.c +++ b/fs/nfs/nfs42xdr.c @@ -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)