Commit f1dd4cbc authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 0a4ae554
...@@ -278,12 +278,14 @@ error _Mapping::_remmapblk(int64_t blk, Tid at) { ...@@ -278,12 +278,14 @@ error _Mapping::_remmapblk(int64_t blk, Tid at) {
// after file.size will raise SIGBUS. (assumes head/f size ↑=) // after file.size will raise SIGBUS. (assumes head/f size ↑=)
if ((blk+1)*f->blksize > st.st_size) { if ((blk+1)*f->blksize > st.st_size) {
err = mmap_zero_into_ro(blkmem, 1*f->blksize); err = mmap_zero_into_ro(blkmem, 1*f->blksize);
// XXX err handle if (err != nil)
return err;
} }
// block is inside file - mmap file data // block is inside file - mmap file data
else { else {
err = mm::map_into(blkmem, 1*f->blksize, PROT_READ, MAP_SHARED, fsfile, blk*f->blksize); err = mm::map_into(blkmem, 1*f->blksize, PROT_READ, MAP_SHARED, fsfile, blk*f->blksize);
// XXX err handle if (err != nil)
return err;
} }
return nil; return nil;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment