diff options
Diffstat (limited to 'drivers/block/xen-blkback')
-rw-r--r-- | drivers/block/xen-blkback/blkback.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c index 9713d5a490e4..e0dab614049c 100644 --- a/drivers/block/xen-blkback/blkback.c +++ b/drivers/block/xen-blkback/blkback.c | |||
@@ -823,9 +823,9 @@ static int __init xen_blkif_init(void) | |||
823 | 823 | ||
824 | mmap_pages = xen_blkif_reqs * BLKIF_MAX_SEGMENTS_PER_REQUEST; | 824 | mmap_pages = xen_blkif_reqs * BLKIF_MAX_SEGMENTS_PER_REQUEST; |
825 | 825 | ||
826 | blkbk->pending_reqs = kmalloc(sizeof(blkbk->pending_reqs[0]) * | 826 | blkbk->pending_reqs = kzalloc(sizeof(blkbk->pending_reqs[0]) * |
827 | xen_blkif_reqs, GFP_KERNEL); | 827 | xen_blkif_reqs, GFP_KERNEL); |
828 | blkbk->pending_grant_handles = kzalloc(sizeof(blkbk->pending_grant_handles[0]) * | 828 | blkbk->pending_grant_handles = kmalloc(sizeof(blkbk->pending_grant_handles[0]) * |
829 | mmap_pages, GFP_KERNEL); | 829 | mmap_pages, GFP_KERNEL); |
830 | blkbk->pending_pages = kzalloc(sizeof(blkbk->pending_pages[0]) * | 830 | blkbk->pending_pages = kzalloc(sizeof(blkbk->pending_pages[0]) * |
831 | mmap_pages, GFP_KERNEL); | 831 | mmap_pages, GFP_KERNEL); |
@@ -848,8 +848,6 @@ static int __init xen_blkif_init(void) | |||
848 | if (rc) | 848 | if (rc) |
849 | goto failed_init; | 849 | goto failed_init; |
850 | 850 | ||
851 | memset(blkbk->pending_reqs, 0, sizeof(blkbk->pending_reqs)); | ||
852 | |||
853 | INIT_LIST_HEAD(&blkbk->pending_free); | 851 | INIT_LIST_HEAD(&blkbk->pending_free); |
854 | spin_lock_init(&blkbk->pending_free_lock); | 852 | spin_lock_init(&blkbk->pending_free_lock); |
855 | init_waitqueue_head(&blkbk->pending_free_wq); | 853 | init_waitqueue_head(&blkbk->pending_free_wq); |