mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-19 05:36:22 +00:00
scst: Backport kvmalloc_array()
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8942 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -970,6 +970,15 @@ static inline void *kvzalloc(size_t size, gfp_t flags)
|
||||
{
|
||||
return kvmalloc(size, flags | __GFP_ZERO);
|
||||
}
|
||||
|
||||
/*
|
||||
* See also commit 752ade68cbd8 ("treewide: use kv[mz]alloc* rather than
|
||||
* opencoded variants") # v4.12.
|
||||
*/
|
||||
static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags)
|
||||
{
|
||||
return kvmalloc(n * size, flags);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 18, 0) && \
|
||||
|
||||
Reference in New Issue
Block a user