提交 08ff45ca 编写于 作者: T Tao Ma 提交者: Jiri Kosina

Use kzalloc in idedisk_prep_fn.

Signed-off-by: NTao Ma <tao.ma@oracle.com>
Acked-by: NJeff Garzik <jgarzik@redhat.com>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 415b54e3
...@@ -435,12 +435,11 @@ static int idedisk_prep_fn(struct request_queue *q, struct request *rq) ...@@ -435,12 +435,11 @@ static int idedisk_prep_fn(struct request_queue *q, struct request *rq)
if (!(rq->cmd_flags & REQ_FLUSH)) if (!(rq->cmd_flags & REQ_FLUSH))
return BLKPREP_OK; return BLKPREP_OK;
cmd = kmalloc(sizeof(*cmd), GFP_ATOMIC); cmd = kzalloc(sizeof(*cmd), GFP_ATOMIC);
/* FIXME: map struct ide_taskfile on rq->cmd[] */ /* FIXME: map struct ide_taskfile on rq->cmd[] */
BUG_ON(cmd == NULL); BUG_ON(cmd == NULL);
memset(cmd, 0, sizeof(*cmd));
if (ata_id_flush_ext_enabled(drive->id) && if (ata_id_flush_ext_enabled(drive->id) &&
(drive->capacity64 >= (1UL << 28))) (drive->capacity64 >= (1UL << 28)))
cmd->tf.command = ATA_CMD_FLUSH_EXT; cmd->tf.command = ATA_CMD_FLUSH_EXT;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册