Commit 66b8812e authored by Trond Myklebust's avatar Trond Myklebust Committed by Greg Kroah-Hartman

pNFS/flexfiles: Fix an XDR encoding bug in layoutreturn

commit 082fa37d upstream.

We must not skip encoding the statistics, or the server will see an
XDR encoding error.
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d65eb5b3
......@@ -1859,11 +1859,9 @@ ff_layout_encode_layoutreturn(struct pnfs_layout_hdr *lo,
start = xdr_reserve_space(xdr, 4);
BUG_ON(!start);
if (ff_layout_encode_ioerr(flo, xdr, args))
goto out;
ff_layout_encode_ioerr(flo, xdr, args);
ff_layout_encode_iostats(flo, xdr, args);
out:
*start = cpu_to_be32((xdr->p - start - 1) * 4);
dprintk("%s: Return\n", __func__);
}
......
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