Fixed a stupid bug in the recently updated write_chunk_to_cache(): lastPageOffset

was incorrectly calculated, and could therefore cause all sorts of troubles with
writes over 4 kB.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14011 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2005-08-20 23:22:13 +00:00
parent 6aa55e57d8
commit e6b682541e
+1 -1
View File
@@ -591,7 +591,7 @@ write_chunk_to_cache(file_cache_ref *ref, off_t offset, size_t size,
panic("pages_io() failed!\n");
}
addr_t lastPageOffset = (pageOffset + bufferSize) & ~(B_PAGE_SIZE - 1);
addr_t lastPageOffset = (pageOffset + bufferSize) & (B_PAGE_SIZE - 1);
if (lastPageOffset != 0) {
// get the last page in the I/O vectors
addr_t last = (addr_t)vecs[vecCount - 1].iov_base