Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 361680
b: refs/heads/master
c: f4f117f
h: refs/heads/master
v: v3
  • Loading branch information
Keith Busch authored and Matthew Wilcox committed Nov 13, 2012
1 parent e0f0f12 commit 7c7f433
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3295874b6074d749516d6decd43afad7bf6e38ff
refs/heads/master: f4f117f64baf8840d22266d518227b2a186d294b
7 changes: 6 additions & 1 deletion trunk/drivers/block/nvme.c
Original file line number Diff line number Diff line change
Expand Up @@ -1237,12 +1237,17 @@ static int nvme_user_admin_cmd(struct nvme_dev *dev,
if (length != cmd.data_len)
status = -ENOMEM;
else
status = nvme_submit_admin_cmd(dev, &c, NULL);
status = nvme_submit_admin_cmd(dev, &c, &cmd.result);

if (cmd.data_len) {
nvme_unmap_user_pages(dev, cmd.opcode & 1, iod);
nvme_free_iod(dev, iod);
}

if (!status && copy_to_user(&ucmd->result, &cmd.result,
sizeof(cmd.result)))
status = -EFAULT;

return status;
}

Expand Down

0 comments on commit 7c7f433

Please sign in to comment.