aboutsummaryrefslogtreecommitdiffstats
path: root/fs/afs/write.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2007-05-10 06:15:23 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-10 12:26:52 -0400
commit5bbf5d39f88af9e8173f7331a3741a8b3ff16a1c (patch)
tree8bd516e07d2cb8b7578d9783ca45d0a23290dc23 /fs/afs/write.c
parentb9b1f8d5930a813879278d0cbfc8c658d6a038dc (diff)
AFS: further write support fixes
Further fixes for AFS write support: (1) The afs_send_pages() outer loop must do an extra iteration if it ends with 'first == last' because 'last' is inclusive in the page set otherwise it fails to send the last page and complete the RxRPC op under some circumstances. (2) Similarly, the outer loop in afs_pages_written_back() must also do an extra iteration if it ends with 'first == last', otherwise it fails to clear PG_writeback on the last page under some circumstances. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/afs/write.c')
-rw-r--r--fs/afs/write.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/afs/write.c b/fs/afs/write.c
index aa03d43984b3..67ae4dbf66b3 100644
--- a/fs/afs/write.c
+++ b/fs/afs/write.c
@@ -669,7 +669,7 @@ void afs_pages_written_back(struct afs_vnode *vnode, struct afs_call *call)
669 pagevec_init(&pv, 0); 669 pagevec_init(&pv, 0);
670 670
671 do { 671 do {
672 _debug("attach %lx-%lx", first, last); 672 _debug("done %lx-%lx", first, last);
673 673
674 count = last - first + 1; 674 count = last - first + 1;
675 if (count > PAGEVEC_SIZE) 675 if (count > PAGEVEC_SIZE)
@@ -701,7 +701,7 @@ void afs_pages_written_back(struct afs_vnode *vnode, struct afs_call *call)
701 } 701 }
702 702
703 __pagevec_release(&pv); 703 __pagevec_release(&pv);
704 } while (first < last); 704 } while (first <= last);
705 705
706 _leave(""); 706 _leave("");
707} 707}