diff options
-rw-r--r-- | fs/nfs/write.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 36d34a4c86bd..f68083db63c8 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c | |||
@@ -504,8 +504,12 @@ try_again: | |||
504 | for (subreq = head->wb_this_page; subreq != head; | 504 | for (subreq = head->wb_this_page; subreq != head; |
505 | subreq = subreq->wb_this_page) { | 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 | continue; | 510 | continue; |
511 | } | ||
512 | |||
509 | while (!nfs_lock_request(subreq)) { | 513 | while (!nfs_lock_request(subreq)) { |
510 | /* | 514 | /* |
511 | * Unlock page to allow nfs_page_group_sync_on_bit() | 515 | * Unlock page to allow nfs_page_group_sync_on_bit() |