X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fmd%2Fdm-emc.c;h=3ea5ad4b7805f134af23f9d46842e9a657b7c284;hb=d8e64406a037a64444175730294e449c9e21f5ec;hp=a2191a4fcf77120d6d9033b0cedb58ab3adc1c3a;hpb=92633b72d18ca4f25de1f28e436a882159491e7e;p=linux-2.6 diff --git a/drivers/md/dm-emc.c b/drivers/md/dm-emc.c index a2191a4fcf..3ea5ad4b78 100644 --- a/drivers/md/dm-emc.c +++ b/drivers/md/dm-emc.c @@ -54,8 +54,6 @@ static void emc_endio(struct bio *bio, int error) /* request is freed in block layer */ free_bio(bio); - - return 0; } static struct bio *get_failover_bio(struct dm_path *path, unsigned data_size) @@ -83,7 +81,7 @@ static struct bio *get_failover_bio(struct dm_path *path, unsigned data_size) } if (bio_add_page(bio, page, data_size, 0) != data_size) { - DMERR("get_failover_bio: alloc_page() failed."); + DMERR("get_failover_bio: bio_add_page() failed."); __free_page(page); bio_put(bio); return NULL; @@ -112,8 +110,6 @@ static struct request *get_failover_req(struct emc_handler *h, memset(rq->sense, 0, SCSI_SENSE_BUFFERSIZE); rq->sense_len = 0; - memset(&rq->cmd, 0, BLK_MAX_CDB); - rq->timeout = EMC_FAILOVER_TIMEOUT; rq->cmd_type = REQ_TYPE_BLOCK_PC; rq->cmd_flags |= REQ_FAILFAST | REQ_NOMERGE; @@ -213,12 +209,10 @@ fail_path: static struct emc_handler *alloc_emc_handler(void) { - struct emc_handler *h = kmalloc(sizeof(*h), GFP_KERNEL); + struct emc_handler *h = kzalloc(sizeof(*h), GFP_KERNEL); - if (h) { - memset(h, 0, sizeof(*h)); + if (h) spin_lock_init(&h->lock); - } return h; }