* vm_cache::virtual_size is not always a multiple of B_PAGE_SIZE for files.

In these cases, the last partial page would have never been written back.
* This fixes bug #2282, and eventually others.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25747 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2008-06-01 10:53:10 +00:00
parent 123dfa78e5
commit 710b77326d

View File

@ -1398,7 +1398,7 @@ status_t
vm_page_write_modified_pages(vm_cache *cache, bool fsReenter)
{
return vm_page_write_modified_page_range(cache, 0,
cache->virtual_size >> PAGE_SHIFT, fsReenter);
(cache->virtual_size + B_PAGE_SIZE - 1) >> PAGE_SHIFT, fsReenter);
}