aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-08-29 18:21:42 -0400
committerJens Axboe <axboe@kernel.dk>2013-09-11 15:22:03 -0400
commitc1b511eb211a6c72d66f7755d2b30a9a91ef9423 (patch)
tree9f86174885153c8669c06db0475457360eb2f65b /block
parent7aef2e780b13973ea60aed8c556107dabde6a495 (diff)
block: Convert kmalloc_node(...GFP_ZERO...) to kzalloc_node(...)
Use the helper function instead of __GFP_ZERO. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r--block/cfq-iosched.c2
-rw-r--r--block/deadline-iosched.c2
-rw-r--r--block/elevator.c2
-rw-r--r--block/genhd.c3
4 files changed, 4 insertions, 5 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index d5bbdcfd0dab..f0468e252ee4 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -4358,7 +4358,7 @@ static int cfq_init_queue(struct request_queue *q, struct elevator_type *e)
4358 if (!eq) 4358 if (!eq)
4359 return -ENOMEM; 4359 return -ENOMEM;
4360 4360
4361 cfqd = kmalloc_node(sizeof(*cfqd), GFP_KERNEL | __GFP_ZERO, q->node); 4361 cfqd = kzalloc_node(sizeof(*cfqd), GFP_KERNEL, q->node);
4362 if (!cfqd) { 4362 if (!cfqd) {
4363 kobject_put(&eq->kobj); 4363 kobject_put(&eq->kobj);
4364 return -ENOMEM; 4364 return -ENOMEM;
diff --git a/block/deadline-iosched.c b/block/deadline-iosched.c
index 20614a332362..9ef66406c625 100644
--- a/block/deadline-iosched.c
+++ b/block/deadline-iosched.c
@@ -346,7 +346,7 @@ static int deadline_init_queue(struct request_queue *q, struct elevator_type *e)
346 if (!eq) 346 if (!eq)
347 return -ENOMEM; 347 return -ENOMEM;
348 348
349 dd = kmalloc_node(sizeof(*dd), GFP_KERNEL | __GFP_ZERO, q->node); 349 dd = kzalloc_node(sizeof(*dd), GFP_KERNEL, q->node);
350 if (!dd) { 350 if (!dd) {
351 kobject_put(&eq->kobj); 351 kobject_put(&eq->kobj);
352 return -ENOMEM; 352 return -ENOMEM;
diff --git a/block/elevator.c b/block/elevator.c
index 668394d18588..2bcbd8cc14d4 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -155,7 +155,7 @@ struct elevator_queue *elevator_alloc(struct request_queue *q,
155{ 155{
156 struct elevator_queue *eq; 156 struct elevator_queue *eq;
157 157
158 eq = kmalloc_node(sizeof(*eq), GFP_KERNEL | __GFP_ZERO, q->node); 158 eq = kzalloc_node(sizeof(*eq), GFP_KERNEL, q->node);
159 if (unlikely(!eq)) 159 if (unlikely(!eq))
160 goto err; 160 goto err;
161 161
diff --git a/block/genhd.c b/block/genhd.c
index dadf42b454a3..791f41943132 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -1252,8 +1252,7 @@ struct gendisk *alloc_disk_node(int minors, int node_id)
1252{ 1252{
1253 struct gendisk *disk; 1253 struct gendisk *disk;
1254 1254
1255 disk = kmalloc_node(sizeof(struct gendisk), 1255 disk = kzalloc_node(sizeof(struct gendisk), GFP_KERNEL, node_id);
1256 GFP_KERNEL | __GFP_ZERO, node_id);
1257 if (disk) { 1256 if (disk) {
1258 if (!init_part_stats(&disk->part0)) { 1257 if (!init_part_stats(&disk->part0)) {
1259 kfree(disk); 1258 kfree(disk);