]> err.no Git - linux-2.6/commitdiff
[BLOCK] ll_rw_blk: kmalloc -> kzalloc conversion
authorJens Axboe <axboe@suse.de>
Wed, 8 Mar 2006 12:31:44 +0000 (13:31 +0100)
committerJens Axboe <axboe@nelson.home.kernel.dk>
Mon, 27 Mar 2006 07:29:02 +0000 (09:29 +0200)
Signed-off-by: Jens Axboe <axboe@suse.de>
block/ll_rw_blk.c

index 062067fa7ead0340ee3f5da91f82af80ec097e82..b836b43113daabf023457af9913837cf7ef43845 100644 (file)
@@ -906,17 +906,15 @@ init_tag_map(request_queue_t *q, struct blk_queue_tag *tags, int depth)
                                __FUNCTION__, depth);
        }
 
-       tag_index = kmalloc(depth * sizeof(struct request *), GFP_ATOMIC);
+       tag_index = kzalloc(depth * sizeof(struct request *), GFP_ATOMIC);
        if (!tag_index)
                goto fail;
 
        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)
                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->max_depth = depth;
        tags->tag_index = tag_index;