aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/idset.c
diff options
context:
space:
mode:
authorMichael Ernst <mernst@de.ibm.com>2008-08-01 10:39:14 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2008-08-01 10:39:31 -0400
commit883e512c99fc398d1b2b5e8e92b6bacff2551756 (patch)
treec4de376fef2e0881b345601527a3b44799f9fe9c /drivers/s390/cio/idset.c
parent683d718a893575a88c551ad71ea2c382eedbf67e (diff)
[S390] cio: Memory allocation for idset changed.
Memory allocation for the quite huge idset changed from kzalloc to vmalloc. Signed-off-by: Michael Ernst <mernst@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/idset.c')
-rw-r--r--drivers/s390/cio/idset.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/s390/cio/idset.c b/drivers/s390/cio/idset.c
index ef7bc0a125ef..cf8f24a4b5eb 100644
--- a/drivers/s390/cio/idset.c
+++ b/drivers/s390/cio/idset.c
@@ -5,7 +5,7 @@
5 * Author(s): Peter Oberparleiter <peter.oberparleiter@de.ibm.com> 5 * Author(s): Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
6 */ 6 */
7 7
8#include <linux/slab.h> 8#include <linux/vmalloc.h>
9#include <linux/bitops.h> 9#include <linux/bitops.h>
10#include "idset.h" 10#include "idset.h"
11#include "css.h" 11#include "css.h"
@@ -25,18 +25,18 @@ static struct idset *idset_new(int num_ssid, int num_id)
25{ 25{
26 struct idset *set; 26 struct idset *set;
27 27
28 set = kzalloc(sizeof(struct idset) + bitmap_size(num_ssid, num_id), 28 set = vmalloc(sizeof(struct idset) + bitmap_size(num_ssid, num_id));
29 GFP_KERNEL);
30 if (set) { 29 if (set) {
31 set->num_ssid = num_ssid; 30 set->num_ssid = num_ssid;
32 set->num_id = num_id; 31 set->num_id = num_id;
32 memset(set->bitmap, 0, bitmap_size(num_ssid, num_id));
33 } 33 }
34 return set; 34 return set;
35} 35}
36 36
37void idset_free(struct idset *set) 37void idset_free(struct idset *set)
38{ 38{
39 kfree(set); 39 vfree(set);
40} 40}
41 41
42void idset_clear(struct idset *set) 42void idset_clear(struct idset *set)