Re: 2.4.18 no timestamp update on modified mmapped files

Andrew Morton
2002-06-11T06:36:10Z

Andrew Morton wrote:
>
> ...
> --- 2.4.19-pre10/mm/vmscan.c~mmap-mtime Mon Jun 10 23:00:28 2002
> +++ 2.4.19-pre10-akpm/mm/vmscan.c Mon Jun 10 23:04:34 2002
> @@ -405,6 +405,9 @@ static int shrink_cache(int nr_pages, zo
> page_cache_get(page);
> spin_unlock(&pagemap_lru_lock);
>
> + if (!PageSwapCache(page))
> + update_mtime(page->mapping->host);
> +
> writepage(page);
> page_cache_release(page);
>

Actually, calling mark_inode_dirty here could well cause
the complex filesystems to explode under high VM pressure.

Probably, we should only touch the file inside msync()
(in 2.4 kernels, at least).

-