diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-01-21 20:39:40 (GMT) |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-01-22 16:01:44 (GMT) |
commit | 082fa37d1351a41afc491d44a1d095cb8d919aa2 (patch) | |
tree | 91a373c37d5d3b4c3751f1aaf3974dda1cf237ce /fs/nfs | |
parent | b819ed4b2afcaf86a370a004d7b2252f981f0c50 (diff) | |
download | linux-082fa37d1351a41afc491d44a1d095cb8d919aa2.tar.xz |
pNFS/flexfiles: Fix an XDR encoding bug in layoutreturn
We must not skip encoding the statistics, or the server will see an
XDR encoding error.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Cc: stable@vger.kernel.org # 4.0+
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/flexfilelayout/flexfilelayout.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c index 405f46b..2a2e2d8 100644 --- a/fs/nfs/flexfilelayout/flexfilelayout.c +++ b/fs/nfs/flexfilelayout/flexfilelayout.c @@ -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__); } |