Hi Linus,
Here's a resubmitted small optimization for the mm/filemap.c file.
- The `curr = curr->next;' statement doesn't need to be executed
if the repeat is taken. I used the list_for_each() macro to
accomodate this better.
Share and enjoy!
--
|| Bill Wendling [EMAIL PROTECTED]
--- linux-2.4.0-test9-pre1/mm/filemap.c Sat Sep 16 02:21:03 2000
+++ linux-2.4.0-test9-pre1-new/mm/filemap.c Sat Sep 16 02:31:54 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? */