

wait_on_page_writeback_range() does a pagevec_lookup_tag on 

	min(end - index + 1, (pgoff_t)PAGEVEC_SIZE)

Which translates to: (unsigned long)-1 - 0 + 1, which is 0.


---

 25-akpm/mm/filemap.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -puN mm/filemap.c~stop-using-locked-pages-fix-2 mm/filemap.c
--- 25/mm/filemap.c~stop-using-locked-pages-fix-2	2004-03-17 15:01:47.466260848 -0800
+++ 25-akpm/mm/filemap.c	2004-03-17 15:04:10.730481376 -0800
@@ -186,8 +186,8 @@ static int wait_on_page_writeback_range(
 	pagevec_init(&pvec, 0);
 	index = start;
 	while ((nr_pages = pagevec_lookup_tag(&pvec, mapping, &index,
-				PAGECACHE_TAG_WRITEBACK,
-				min(end - index + 1, (pgoff_t)PAGEVEC_SIZE)))) {
+			PAGECACHE_TAG_WRITEBACK,
+			min(end - index, (pgoff_t)PAGEVEC_SIZE-1) + 1))) {
 		unsigned i;
 
 		for (i = 0; i < nr_pages; i++) {

_
