NFS: Count the bytes of skipped subrequests in nfs_lock_and_join_requests()

If we skip a subrequest due to a zero refcount, we should still count
the byte range that it covered so that we accurately reconstruct the
original request size.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>

+5 -1
+5 -1
fs/nfs/write.c
··· 504 504 for (subreq = head->wb_this_page; subreq != head; 505 505 subreq = subreq->wb_this_page) { 506 506 507 - if (!kref_get_unless_zero(&subreq->wb_kref)) 507 + if (!kref_get_unless_zero(&subreq->wb_kref)) { 508 + if (subreq->wb_offset == head->wb_offset + total_bytes) 509 + total_bytes += subreq->wb_bytes; 508 510 continue; 511 + } 512 + 509 513 while (!nfs_lock_request(subreq)) { 510 514 /* 511 515 * Unlock page to allow nfs_page_group_sync_on_bit()