mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-25 07:51:28 +00:00
scst/include/backport.h: Fix kvmalloc() backport for RHEL 7
The kvmalloc function was added in RHEL 7.5. So the backport is needed for RHEL 7.4 and older. _COMPAT_LINUX_MM_H is checked as well to avoid a conflict with the appropriate backport in MOFED. Signed-off-by: Sergey Gorenko <sergeygo@mellanox.com> [ bvanassche: fixed spelling in commit message ] git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8578 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -848,7 +848,9 @@ static inline void mempool_destroy_backport(mempool_t *pool)
|
||||
/* <linux/mm.h> */
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0) && \
|
||||
(!defined(RHEL_MAJOR) || RHEL_MAJOR -0 < 7)
|
||||
(!defined(RHEL_MAJOR) || RHEL_MAJOR -0 < 7 || \
|
||||
(RHEL_MAJOR -0 == 7 && RHEL_MINOR -0 < 5)) && \
|
||||
!defined(_COMPAT_LINUX_MM_H)
|
||||
/* See also commit a7c3e901a46f ("mm: introduce kv[mz]alloc helpers") # v4.12 */
|
||||
static inline void *kvmalloc_node(size_t size, gfp_t flags, int node)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user