mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-01-26 18:04:22 +03:00
Remove kmalloc_node() compatibility code
The kmalloc_node() function has been available since Linux 2.6.12. There is no longer a need to maintain this compatibility code. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
parent
d227e114ed
commit
9f36cace41
@ -27,7 +27,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [
|
|||||||
SPL_AC_CTL_NAME
|
SPL_AC_CTL_NAME
|
||||||
SPL_AC_VMALLOC_INFO
|
SPL_AC_VMALLOC_INFO
|
||||||
SPL_AC_PDE_DATA
|
SPL_AC_PDE_DATA
|
||||||
SPL_AC_KMALLOC_NODE
|
|
||||||
SPL_AC_INODE_I_MUTEX
|
SPL_AC_INODE_I_MUTEX
|
||||||
SPL_AC_MUTEX_OWNER
|
SPL_AC_MUTEX_OWNER
|
||||||
SPL_AC_MUTEX_OWNER_TASK_STRUCT
|
SPL_AC_MUTEX_OWNER_TASK_STRUCT
|
||||||
@ -927,25 +926,6 @@ AC_DEFUN([SPL_AC_CTL_NAME], [
|
|||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # 2.6.12 API change,
|
|
||||||
dnl # check whether 'kmalloc_node()' is available.
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([SPL_AC_KMALLOC_NODE], [
|
|
||||||
AC_MSG_CHECKING([whether kmalloc_node() is available])
|
|
||||||
SPL_LINUX_TRY_COMPILE([
|
|
||||||
#include <linux/slab.h>
|
|
||||||
],[
|
|
||||||
void *a __attribute__ ((unused));
|
|
||||||
a = kmalloc_node(1, GFP_KERNEL, 0);
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_KMALLOC_NODE, 1, [kmalloc_node() is available])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl #
|
dnl #
|
||||||
dnl # 2.6.16 API change,
|
dnl # 2.6.16 API change,
|
||||||
dnl # check whether 'struct inode' has i_mutex
|
dnl # check whether 'struct inode' has i_mutex
|
||||||
|
@ -135,7 +135,6 @@ kzalloc_nofail(size_t size, gfp_t flags)
|
|||||||
static inline void *
|
static inline void *
|
||||||
kmalloc_node_nofail(size_t size, gfp_t flags, int node)
|
kmalloc_node_nofail(size_t size, gfp_t flags, int node)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_KMALLOC_NODE
|
|
||||||
void *ptr;
|
void *ptr;
|
||||||
|
|
||||||
sanitize_flags(current, &flags);
|
sanitize_flags(current, &flags);
|
||||||
@ -145,9 +144,6 @@ kmalloc_node_nofail(size_t size, gfp_t flags, int node)
|
|||||||
} while (ptr == NULL && (flags & __GFP_WAIT));
|
} while (ptr == NULL && (flags & __GFP_WAIT));
|
||||||
|
|
||||||
return ptr;
|
return ptr;
|
||||||
#else
|
|
||||||
return kmalloc_nofail(size, flags);
|
|
||||||
#endif /* HAVE_KMALLOC_NODE */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void *
|
static inline void *
|
||||||
|
Loading…
Reference in New Issue
Block a user