nlm: Ensure callback code also checks that the files match
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / include / linux / slob_def.h
CommitLineData
6193a2ff
PM
1#ifndef __LINUX_SLOB_DEF_H
2#define __LINUX_SLOB_DEF_H
3
90f2cbbc
EG
4#include <linux/numa.h>
5
6193a2ff
PM
6void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node);
7
3eae2cb2
EGM
8static __always_inline void *kmem_cache_alloc(struct kmem_cache *cachep,
9 gfp_t flags)
6193a2ff 10{
90f2cbbc 11 return kmem_cache_alloc_node(cachep, flags, NUMA_NO_NODE);
6193a2ff
PM
12}
13
14void *__kmalloc_node(size_t size, gfp_t flags, int node);
15
3eae2cb2 16static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node)
6193a2ff
PM
17{
18 return __kmalloc_node(size, flags, node);
19}
20
21/**
22 * kmalloc - allocate memory
23 * @size: how many bytes of memory are required.
24 * @flags: the type of memory to allocate (see kcalloc).
25 *
26 * kmalloc is the normal method of allocating memory
27 * in the kernel.
28 */
3eae2cb2 29static __always_inline void *kmalloc(size_t size, gfp_t flags)
6193a2ff 30{
90f2cbbc 31 return __kmalloc_node(size, flags, NUMA_NO_NODE);
6193a2ff
PM
32}
33
3eae2cb2 34static __always_inline void *__kmalloc(size_t size, gfp_t flags)
6193a2ff
PM
35{
36 return kmalloc(size, flags);
37}
38
6193a2ff 39#endif /* __LINUX_SLOB_DEF_H */