mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-06 05:13:18 +00:00
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>
This commit is contained in:
parent
7aef2e780b
commit
c1b511eb21
@ -4358,7 +4358,7 @@ static int cfq_init_queue(struct request_queue *q, struct elevator_type *e)
|
|||||||
if (!eq)
|
if (!eq)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
cfqd = kmalloc_node(sizeof(*cfqd), GFP_KERNEL | __GFP_ZERO, q->node);
|
cfqd = kzalloc_node(sizeof(*cfqd), GFP_KERNEL, q->node);
|
||||||
if (!cfqd) {
|
if (!cfqd) {
|
||||||
kobject_put(&eq->kobj);
|
kobject_put(&eq->kobj);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
@ -346,7 +346,7 @@ static int deadline_init_queue(struct request_queue *q, struct elevator_type *e)
|
|||||||
if (!eq)
|
if (!eq)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
dd = kmalloc_node(sizeof(*dd), GFP_KERNEL | __GFP_ZERO, q->node);
|
dd = kzalloc_node(sizeof(*dd), GFP_KERNEL, q->node);
|
||||||
if (!dd) {
|
if (!dd) {
|
||||||
kobject_put(&eq->kobj);
|
kobject_put(&eq->kobj);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
@ -155,7 +155,7 @@ struct elevator_queue *elevator_alloc(struct request_queue *q,
|
|||||||
{
|
{
|
||||||
struct elevator_queue *eq;
|
struct elevator_queue *eq;
|
||||||
|
|
||||||
eq = kmalloc_node(sizeof(*eq), GFP_KERNEL | __GFP_ZERO, q->node);
|
eq = kzalloc_node(sizeof(*eq), GFP_KERNEL, q->node);
|
||||||
if (unlikely(!eq))
|
if (unlikely(!eq))
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
|
@ -1252,8 +1252,7 @@ struct gendisk *alloc_disk_node(int minors, int node_id)
|
|||||||
{
|
{
|
||||||
struct gendisk *disk;
|
struct gendisk *disk;
|
||||||
|
|
||||||
disk = kmalloc_node(sizeof(struct gendisk),
|
disk = kzalloc_node(sizeof(struct gendisk), GFP_KERNEL, node_id);
|
||||||
GFP_KERNEL | __GFP_ZERO, node_id);
|
|
||||||
if (disk) {
|
if (disk) {
|
||||||
if (!init_part_stats(&disk->part0)) {
|
if (!init_part_stats(&disk->part0)) {
|
||||||
kfree(disk);
|
kfree(disk);
|
||||||
|
Loading…
Reference in New Issue
Block a user