projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5c3e91d
)
Don't truncate the file to the page aligned size.
author
Vlad Brezae
<brezaevlad@gmail.com>
Thu, 15 Jan 2015 23:22:09 +0000
(15:22 -0800)
committer
Vlad Brezae
<brezaevlad@gmail.com>
Thu, 15 Jan 2015 23:27:50 +0000
(15:27 -0800)
The second open attempt at opening would fail due to the capacity being smaller than the file size.
mono/metadata/file-mmap-posix.c
patch
|
blob
|
history
diff --git
a/mono/metadata/file-mmap-posix.c
b/mono/metadata/file-mmap-posix.c
index 32f555ae7b5a9832ef88622ebf225f5c47c97c10..c7836c7e66e3de4dddeeb994739e74f0e983b852 100644
(file)
--- a/
mono/metadata/file-mmap-posix.c
+++ b/
mono/metadata/file-mmap-posix.c
@@
-280,8
+280,6
@@
open_file_map (MonoString *path, int input_fd, int mode, gint64 *capacity, int a
goto done;
}
- *capacity = align_up_to_page_size ((size_t)*capacity);
-
if (*capacity > buf.st_size) {
int unused G_GNUC_UNUSED = ftruncate (fd, (off_t)*capacity);
}