From: Michael Ernst Date: Fri, 1 Aug 2008 14:39:14 +0000 (+0200) Subject: [S390] cio: Memory allocation for idset changed. X-Git-Tag: v2.6.27-rc2~113^2~10 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=883e512c99fc398d1b2b5e8e92b6bacff2551756;p=linux-2.6 [S390] cio: Memory allocation for idset changed. Memory allocation for the quite huge idset changed from kzalloc to vmalloc. Signed-off-by: Michael Ernst Signed-off-by: Martin Schwidefsky --- diff --git a/drivers/s390/cio/idset.c b/drivers/s390/cio/idset.c index ef7bc0a125..cf8f24a4b5 100644 --- a/drivers/s390/cio/idset.c +++ b/drivers/s390/cio/idset.c @@ -5,7 +5,7 @@ * Author(s): Peter Oberparleiter */ -#include +#include #include #include "idset.h" #include "css.h" @@ -25,18 +25,18 @@ static struct idset *idset_new(int num_ssid, int num_id) { struct idset *set; - set = kzalloc(sizeof(struct idset) + bitmap_size(num_ssid, num_id), - GFP_KERNEL); + set = vmalloc(sizeof(struct idset) + bitmap_size(num_ssid, num_id)); if (set) { set->num_ssid = num_ssid; set->num_id = num_id; + memset(set->bitmap, 0, bitmap_size(num_ssid, num_id)); } return set; } void idset_free(struct idset *set) { - kfree(set); + vfree(set); } void idset_clear(struct idset *set)