Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 286246
b: refs/heads/master
c: b1ad37e
h: refs/heads/master
v: v3
  • Loading branch information
Matthew Wilcox committed Nov 4, 2011
1 parent 2ec265b commit e302af5
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: 3c0cf138d7789feb3f335f6f1d24ad8fc8b3a23f
refs/heads/master: b1ad37efcafe396ac3944853589688dd0ec3c64e
7 changes: 6 additions & 1 deletion trunk/drivers/block/nvme.c
Original file line number Diff line number Diff line change
Expand Up @@ -842,8 +842,13 @@ static int nvme_submit_io(struct nvme_ns *ns, struct nvme_user_io __user *uio)
nvme_setup_prps(&c.common, sg, length);

nvmeq = get_nvmeq(ns);
status = nvme_submit_sync_cmd(nvmeq, &c, &result);
/* Since nvme_submit_sync_cmd sleeps, we can't keep preemption
* disabled. We may be preempted at any point, and be rescheduled
* to a different CPU. That will cause cacheline bouncing, but no
* additional races since q_lock already protects against other CPUs.
*/
put_nvmeq(nvmeq);
status = nvme_submit_sync_cmd(nvmeq, &c, &result);

nvme_unmap_user_pages(dev, io.opcode & 1, io.addr, length, sg, nents);
put_user(result, &uio->result);
Expand Down

0 comments on commit e302af5

Please sign in to comment.