--- 2.4.10pre14aa1/mm/filemap.c.~1~ Sat Sep 22 08:29:49 2001 +++ 2.4.10pre14aa1/mm/filemap.c Sat Sep 22 08:33:45 2001 @@ -2855,6 +2855,16 @@ kunmap(page); /* Mark it unlocked again and drop the page.. */ UnlockPage(page); + /* + * Don't use mark_page_accessed(), here so it won't and in + * the inactive cache, but just mark it referenced so it + * will stay longer in the inactive cache. We need to somehow + * age writes too in order to avoid too many read-modify-write + * cycles with partial writes. + * And with the referenced bit set, the page will got into + * the active cache at the first read. + */ + SetPageReferenced(page); page_cache_release(page); if (status < 0)