]> git.hungrycats.org Git - linux/commitdiff
pNFS/flexfiles: Fix an XDR encoding bug in layoutreturn
authorTrond Myklebust <trond.myklebust@primarydata.com>
Thu, 21 Jan 2016 20:39:40 +0000 (15:39 -0500)
committerSasha Levin <sasha.levin@oracle.com>
Mon, 15 Feb 2016 20:45:19 +0000 (15:45 -0500)
[ Upstream commit 082fa37d1351a41afc491d44a1d095cb8d919aa2 ]

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+
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
fs/nfs/flexfilelayout/flexfilelayout.c

index fecd9201dbadf1f0b327cf58677fd1d1e08017c3..c2abdc7db6c3368e9c0ecf4713dbb2c9dfe56773 100644 (file)
@@ -1484,11 +1484,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__);
 }