--- linux-2.4.0-test8/mm/filemap.c Sat Sep 9 02:35:09 2000 +++ linux-2.4.0-test8-new/mm/filemap.c Thu Sep 14 12:09:21 2000 @@ -193,12 +193,10 @@ repeat: head = &mapping->pages; spin_lock(&pagecache_lock); - curr = head->next; - while (curr != head) { + list_for_each(curr, head) { unsigned long offset; page = list_entry(curr, struct page, list); - curr = curr->next; offset = page->index; /* Is one of the pages to truncate? */