NFS: Don't corrupt the value of pg_bytes_written in nfs_do_recoalesce()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Tue, 25 May 2021 14:40:12 +0000 (10:40 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Wed, 26 May 2021 10:36:13 +0000 (06:36 -0400)
commit0d0ea309357dea0d85a82815f02157eb7fcda39f
tree93490556fc5df28dbfcf9280132435b8f4e2796e
parent56517ab958b7c11030e626250c00b9b1a24b41eb
NFS: Don't corrupt the value of pg_bytes_written in nfs_do_recoalesce()

The value of mirror->pg_bytes_written should only be updated after a
successful attempt to flush out the requests on the list.

Fixes: a7d42ddb3099 ("nfs: add mirroring support to pgio layer")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/pagelist.c