]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/md/dm-emc.c
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
[linux-2.6-omap-h63xx.git] / drivers / md / dm-emc.c
index 342517261ece129dd115f34897b1ff762a1fd78b..3ea5ad4b7805f134af23f9d46842e9a657b7c284 100644 (file)
@@ -81,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;
@@ -110,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;
@@ -211,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;
 }