Prechádzať zdrojové kódy

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+
Trond Myklebust 9 rokov pred
rodič
commit
082fa37d13
1 zmenil súbory, kde vykonal 2 pridanie a 4 odobranie
  1. 2 4
      fs/nfs/flexfilelayout/flexfilelayout.c

+ 2 - 4
fs/nfs/flexfilelayout/flexfilelayout.c

@@ -1859,11 +1859,9 @@ ff_layout_encode_layoutreturn(struct pnfs_layout_hdr *lo,
 	start = xdr_reserve_space(xdr, 4);
 	start = xdr_reserve_space(xdr, 4);
 	BUG_ON(!start);
 	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);
 	ff_layout_encode_iostats(flo, xdr, args);
-out:
+
 	*start = cpu_to_be32((xdr->p - start - 1) * 4);
 	*start = cpu_to_be32((xdr->p - start - 1) * 4);
 	dprintk("%s: Return\n", __func__);
 	dprintk("%s: Return\n", __func__);
 }
 }