[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Asynchronous I/O



On Thu, 9 Sep 1999, Steven Hand wrote:

>   b) should it work? 

Your plain suggestion is not ok becaue you end freeing the page two times,
one in filemap_write_page and one in kpiod so you'll also remove the page
from the page cache if you avoided MS_INVALIDED and you'll corrupt memory
with MS_INVALIDATE. So you should do something like:

	error = filemap_write_page(vma, address - vma->vm_start + 
		vma->vm_offset, page, !(flags & MS_ASYNC));
	if (!(flags & MS_ASYNC))
		page_cache_free(page);

Andrea

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/