env: implement vmalloc with GFP flags
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:

committed by
Katarzyna Lapinska

parent
ac05dadfcd
commit
e1a7c7f7e8
@@ -39,14 +39,24 @@ static inline void env_free(const void *ptr)
|
|||||||
kfree(ptr);
|
kfree(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void *env_vmalloc_flags(size_t size, int flags)
|
||||||
|
{
|
||||||
|
return __vmalloc(size, flags | __GFP_HIGHMEM, PAGE_KERNEL);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void *env_vzalloc_flags(size_t size, int flags)
|
||||||
|
{
|
||||||
|
return env_vmalloc_flags(size, flags | __GFP_ZERO);
|
||||||
|
}
|
||||||
|
|
||||||
static inline void *env_vmalloc(size_t size)
|
static inline void *env_vmalloc(size_t size)
|
||||||
{
|
{
|
||||||
return vmalloc(size);
|
return env_vmalloc_flags(size, GFP_KERNEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void *env_vzalloc(size_t size)
|
static inline void *env_vzalloc(size_t size)
|
||||||
{
|
{
|
||||||
return vzalloc(size);
|
return env_vzalloc_flags(size, GFP_KERNEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void env_vfree(const void *ptr)
|
static inline void env_vfree(const void *ptr)
|
||||||
|
2
ocf
2
ocf
Submodule ocf updated: 1dfae0d166...49d8f10953
Reference in New Issue
Block a user