remap_file_pages: check file mapping
Change-Id: Ibf145a20181938a9825214253337a423fcd53064 Refs: #1521
This commit is contained in:
committed by
Masamichi Takagi
parent
e6e66e0392
commit
b0bd1feefb
@@ -37,6 +37,7 @@ enum {
|
||||
MF_SHM = 0x40000,
|
||||
MF_HUGETLBFS = 0x100000,
|
||||
MF_PRIVATE = 0x200000, /* To prevent flush in clear_range_* */
|
||||
MF_REMAP_FILE_PAGES = 0x400000, /* remap_file_pages possible */
|
||||
};
|
||||
|
||||
#define MEMOBJ_READY 0
|
||||
@@ -181,4 +182,11 @@ static inline int is_freeable(struct memobj *memobj)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static inline int is_callable_remap_file_pages(struct memobj *memobj)
|
||||
{
|
||||
if (!memobj || !(memobj->flags & MF_REMAP_FILE_PAGES))
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif /* HEADER_MEMOBJ_H */
|
||||
|
||||
Reference in New Issue
Block a user