remap_file_pages: check file mapping

Change-Id: Ibf145a20181938a9825214253337a423fcd53064
Refs: #1521
This commit is contained in:
Tomoki Shirasawa
2020-09-01 07:26:46 +09:00
committed by Masamichi Takagi
parent e6e66e0392
commit b0bd1feefb
9 changed files with 210 additions and 2 deletions

View File

@ -236,6 +236,7 @@ int fileobj_create(int fd, struct memobj **objp, int *maxprotp, int flags,
memset(newobj, 0, sizeof(*newobj));
newobj->memobj.ops = &fileobj_ops;
newobj->memobj.flags = MF_HAS_PAGER | MF_REG_FILE |
MF_REMAP_FILE_PAGES |
((flags & MAP_PRIVATE) ? MF_PRIVATE : 0);
newobj->handle = result.handle;