aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/libsas.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/scsi/libsas.h')
-rw-r--r--include/scsi/libsas.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
index 8516ba68cc95..ad0182ef7809 100644
--- a/include/scsi/libsas.h
+++ b/include/scsi/libsas.h
@@ -567,10 +567,9 @@ struct sas_task {
567static inline struct sas_task *sas_alloc_task(gfp_t flags) 567static inline struct sas_task *sas_alloc_task(gfp_t flags)
568{ 568{
569 extern struct kmem_cache *sas_task_cache; 569 extern struct kmem_cache *sas_task_cache;
570 struct sas_task *task = kmem_cache_alloc(sas_task_cache, flags); 570 struct sas_task *task = kmem_cache_zalloc(sas_task_cache, flags);
571 571
572 if (task) { 572 if (task) {
573 memset(task, 0, sizeof(*task));
574 INIT_LIST_HEAD(&task->list); 573 INIT_LIST_HEAD(&task->list);
575 spin_lock_init(&task->task_state_lock); 574 spin_lock_init(&task->task_state_lock);
576 task->task_state_flags = SAS_TASK_STATE_PENDING; 575 task->task_state_flags = SAS_TASK_STATE_PENDING;