pNFS/flexfiles: Fix the reset of struct pgio_header when resending
authorTrond Myklebust <trond.myklebust@primarydata.com>
Fri, 26 Jun 2015 19:37:58 +0000 (15:37 -0400)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Fri, 26 Jun 2015 19:39:50 +0000 (15:39 -0400)
hdr->good_bytes needs to be set to the length of the request, not
zero.

Cc: stable@vger.kernel.org # 4.0+
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/flexfilelayout/flexfilelayout.c

index 594ab35eacfb55d32eddcf6047bfff168e454009..c12951b9551eab8b0394ed2aa218cf15ce6f2c39 100644 (file)
@@ -774,7 +774,7 @@ static void ff_layout_reset_write(struct nfs_pgio_header *hdr, bool retry_pnfs)
                        nfs_direct_set_resched_writes(hdr->dreq);
                        /* fake unstable write to let common nfs resend pages */
                        hdr->verf.committed = NFS_UNSTABLE;
-                       hdr->good_bytes = 0;
+                       hdr->good_bytes = hdr->args.count;
                }
                return;
        }