diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2018-03-14 22:23:25 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2018-03-14 22:23:25 +0300 |
commit | 745dd37f9d67c75d6cf1a1bebfcca71bdeb7a34c (patch) | |
tree | e556543ed86b7f49e4972d8ea048ff9e46592b4d /tools/testing/radix-tree/linux/slab.h | |
parent | 02428742639bc3300c8c527b054d0ec0bdf5571d (diff) | |
parent | 18a955219bf7d9008ce480d4451b6b8bf4483a22 (diff) | |
download | linux-745dd37f9d67c75d6cf1a1bebfcca71bdeb7a34c.tar.xz |
Merge branch 'x86/urgent' into x86/mm to pick up dependencies
Diffstat (limited to 'tools/testing/radix-tree/linux/slab.h')
-rw-r--r-- | tools/testing/radix-tree/linux/slab.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/testing/radix-tree/linux/slab.h b/tools/testing/radix-tree/linux/slab.h index 979baeec7e70..a037def0dec6 100644 --- a/tools/testing/radix-tree/linux/slab.h +++ b/tools/testing/radix-tree/linux/slab.h @@ -3,6 +3,7 @@ #define SLAB_H #include <linux/types.h> +#include <linux/gfp.h> #define SLAB_HWCACHE_ALIGN 1 #define SLAB_PANIC 2 @@ -11,6 +12,11 @@ void *kmalloc(size_t size, gfp_t); void kfree(void *); +static inline void *kzalloc(size_t size, gfp_t gfp) +{ + return kmalloc(size, gfp | __GFP_ZERO); +} + void *kmem_cache_alloc(struct kmem_cache *cachep, int flags); void kmem_cache_free(struct kmem_cache *cachep, void *objp); |