vmtruncate question

Andrew Morton
2000-07-12T01:53:45Z

The flushes which surround the second call to zap_page_range()
would appear to be flushing more memory than is to be
zapped. Is this correct, or should it be:

--- memory.c.orig Wed Jul 12 11:49:08 2000
+++ memory.c Wed Jul 12 11:49:31 2000
@@ -980,9 +980,9 @@
partial_clear(mpnt, start);
start = (start + ~PAGE_MASK) & PAGE_MASK;
}
- flush_cache_range(mm, start, end);
+ flush_cache_range(mm, start, start + len);
zap_page_range(mm, start, len);
- flush_tlb_range(mm, start, end);
+ flush_tlb_range(mm, start, start + len);
} while ((mpnt = mpnt->vm_next_share) != NULL);
out_unlock:
spin_unlock(&mapping->i_shared_lock);