mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 02:39:48 +00:00
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: Matthew Wilcox <matthew.r.wilcox@intel.com>
This commit is contained in:
parent
ff22b54fda
commit
b8deb62cf2
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue