aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;