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:
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user