summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/svm/ssvm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/svm/ssvm.c b/src/svm/ssvm.c
index 1a677fc5c62..f93f40d0526 100644
--- a/src/svm/ssvm.c
+++ b/src/svm/ssvm.c
@@ -304,9 +304,6 @@ ssvm_client_init_memfd (ssvm_private_t * memfd)
return SSVM_API_ERROR_MMAP;
}
- if (memfd->requested_va)
- mmap_flags |= MAP_FIXED;
-
/*
* Map the segment once, to look at the shared header
*/
@@ -324,6 +321,9 @@ ssvm_client_init_memfd (ssvm_private_t * memfd)
memfd->ssvm_size = sh->ssvm_size;
munmap (sh, page_size);
+ if (memfd->requested_va)
+ mmap_flags |= MAP_FIXED;
+
/*
* Remap the segment at the 'right' address
*/