Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Joe Perches and committed by
Jens Axboe
c1b511eb 7aef2e78

+4 -5
+1 -1
block/cfq-iosched.c
··· 4358 4358 if (!eq) 4359 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 4362 if (!cfqd) { 4363 4363 kobject_put(&eq->kobj); 4364 4364 return -ENOMEM;
+1 -1
block/deadline-iosched.c
··· 346 346 if (!eq) 347 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 350 if (!dd) { 351 351 kobject_put(&eq->kobj); 352 352 return -ENOMEM;
+1 -1
block/elevator.c
··· 155 155 { 156 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 159 if (unlikely(!eq)) 160 160 goto err; 161 161
+1 -2
block/genhd.c
··· 1252 1252 { 1253 1253 struct gendisk *disk; 1254 1254 1255 - disk = kmalloc_node(sizeof(struct gendisk), 1256 - GFP_KERNEL | __GFP_ZERO, node_id); 1255 + disk = kzalloc_node(sizeof(struct gendisk), GFP_KERNEL, node_id); 1257 1256 if (disk) { 1258 1257 if (!init_part_stats(&disk->part0)) { 1259 1258 kfree(disk);