Commit b8deb62c authored by Matthew Wilcox's avatar Matthew Wilcox

NVMe: Zero the command before we send it

Make sure there's no left-over bits set from previous commands that used
this slot.
Signed-off-by: default avatarMatthew Wilcox <matthew.r.wilcox@intel.com>
parent ff22b54f
......@@ -322,6 +322,7 @@ static int nvme_submit_bio_queue(struct nvme_queue *nvmeq, struct nvme_ns *ns,
spin_lock_irqsave(&nvmeq->q_lock, flags);
cmnd = &nvmeq->sq_cmds[nvmeq->sq_tail];
memset(cmnd, 0, sizeof(*cmnd));
if (bio_data_dir(bio)) {
cmnd->rw.opcode = nvme_cmd_write;
dma_dir = DMA_TO_DEVICE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment