diff options
author | Yinghai Lu <yinghai@kernel.org> | 2009-06-06 23:50:36 +0200 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2009-06-09 15:00:26 +0200 |
commit | 0281b5dc0350cbf6dd21ed558a33cccce77abc02 (patch) | |
tree | 4523b6f48722eee44a854207e268c71ae4d84771 /lib/cpumask.c | |
parent | async: Fix lack of boot-time console due to insufficient synchronization (diff) | |
download | linux-0281b5dc0350cbf6dd21ed558a33cccce77abc02.tar.xz linux-0281b5dc0350cbf6dd21ed558a33cccce77abc02.zip |
cpumask: introduce zalloc_cpumask_var
So can get cpumask_var with cpumask_clear
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to '')
-rw-r--r-- | lib/cpumask.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/cpumask.c b/lib/cpumask.c index 1f71b97de0f9..eb23aaa0c7b8 100644 --- a/lib/cpumask.c +++ b/lib/cpumask.c @@ -119,6 +119,12 @@ bool alloc_cpumask_var_node(cpumask_var_t *mask, gfp_t flags, int node) } EXPORT_SYMBOL(alloc_cpumask_var_node); +bool zalloc_cpumask_var_node(cpumask_var_t *mask, gfp_t flags, int node) +{ + return alloc_cpumask_var_node(mask, flags | __GFP_ZERO, node); +} +EXPORT_SYMBOL(zalloc_cpumask_var_node); + /** * alloc_cpumask_var - allocate a struct cpumask * @mask: pointer to cpumask_var_t where the cpumask is returned @@ -135,6 +141,12 @@ bool alloc_cpumask_var(cpumask_var_t *mask, gfp_t flags) } EXPORT_SYMBOL(alloc_cpumask_var); +bool zalloc_cpumask_var(cpumask_var_t *mask, gfp_t flags) +{ + return alloc_cpumask_var(mask, flags | __GFP_ZERO); +} +EXPORT_SYMBOL(zalloc_cpumask_var); + /** * alloc_bootmem_cpumask_var - allocate a struct cpumask from the bootmem arena. * @mask: pointer to cpumask_var_t where the cpumask is returned |