aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2006-03-08 07:31:44 -0500
committerJens Axboe <axboe@nelson.home.kernel.dk>2006-03-27 02:29:02 -0500
commitf68110fc28859f5d7231d5c4fb6dbe68b1394c9b (patch)
treef7150373bd16be8ae51d0283ee98b2f29043e723
parent06ff37ffb4ba8bcbda0e9d19c712c954ef7b8a0a (diff)
[BLOCK] ll_rw_blk: kmalloc -> kzalloc conversion
Signed-off-by: Jens Axboe <axboe@suse.de>
-rw-r--r--block/ll_rw_blk.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index 062067fa7ead..b836b43113da 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -906,17 +906,15 @@ init_tag_map(request_queue_t *q, struct blk_queue_tag *tags, int depth)
906 __FUNCTION__, depth); 906 __FUNCTION__, depth);
907 } 907 }
908 908
909 tag_index = kmalloc(depth * sizeof(struct request *), GFP_ATOMIC); 909 tag_index = kzalloc(depth * sizeof(struct request *), GFP_ATOMIC);
910 if (!tag_index) 910 if (!tag_index)
911 goto fail; 911 goto fail;
912 912
913 nr_ulongs = ALIGN(depth, BITS_PER_LONG) / BITS_PER_LONG; 913 nr_ulongs = ALIGN(depth, BITS_PER_LONG) / BITS_PER_LONG;
914 tag_map = kmalloc(nr_ulongs * sizeof(unsigned long), GFP_ATOMIC); 914 tag_map = kzalloc(nr_ulongs * sizeof(unsigned long), GFP_ATOMIC);
915 if (!tag_map) 915 if (!tag_map)
916 goto fail; 916 goto fail;
917 917
918 memset(tag_index, 0, depth * sizeof(struct request *));
919 memset(tag_map, 0, nr_ulongs * sizeof(unsigned long));
920 tags->real_max_depth = depth; 918 tags->real_max_depth = depth;
921 tags->max_depth = depth; 919 tags->max_depth = depth;
922 tags->tag_index = tag_index; 920 tags->tag_index = tag_index;