Commit f68110fc authored by Jens Axboe's avatar Jens Axboe Committed by Jens Axboe

[BLOCK] ll_rw_blk: kmalloc -> kzalloc conversion

Signed-off-by: default avatarJens Axboe <axboe@suse.de>
parent 06ff37ff
...@@ -906,17 +906,15 @@ init_tag_map(request_queue_t *q, struct blk_queue_tag *tags, int depth) ...@@ -906,17 +906,15 @@ init_tag_map(request_queue_t *q, struct blk_queue_tag *tags, int depth)
__FUNCTION__, depth); __FUNCTION__, depth);
} }
tag_index = kmalloc(depth * sizeof(struct request *), GFP_ATOMIC); tag_index = kzalloc(depth * sizeof(struct request *), GFP_ATOMIC);
if (!tag_index) if (!tag_index)
goto fail; goto fail;
nr_ulongs = ALIGN(depth, BITS_PER_LONG) / BITS_PER_LONG; nr_ulongs = ALIGN(depth, BITS_PER_LONG) / BITS_PER_LONG;
tag_map = kmalloc(nr_ulongs * sizeof(unsigned long), GFP_ATOMIC); tag_map = kzalloc(nr_ulongs * sizeof(unsigned long), GFP_ATOMIC);
if (!tag_map) if (!tag_map)
goto fail; goto fail;
memset(tag_index, 0, depth * sizeof(struct request *));
memset(tag_map, 0, nr_ulongs * sizeof(unsigned long));
tags->real_max_depth = depth; tags->real_max_depth = depth;
tags->max_depth = depth; tags->max_depth = depth;
tags->tag_index = tag_index; tags->tag_index = tag_index;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment