Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 286261
b: refs/heads/master
c: 1974b1a
h: refs/heads/master
i:
  286259: f878ddb
v: v3
  • Loading branch information
Matthew Wilcox committed Nov 4, 2011
1 parent 37a15fe commit 6f70333
Show file tree
Hide file tree
Showing 2 changed files with 8 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: d567760c409f981d35fc755b51d5bf56a99a467b
refs/heads/master: 1974b1ae8852324a75fb8cfecbc7b758fd5a2c3c
8 changes: 7 additions & 1 deletion trunk/drivers/block/nvme.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,8 @@ static int nvme_submit_bio_queue(struct nvme_queue *nvmeq, struct nvme_ns *ns,
dma_dir = DMA_FROM_DEVICE;
}

nvme_map_bio(nvmeq->q_dmadev, nbio, bio, dma_dir, psegs);
if (nvme_map_bio(nvmeq->q_dmadev, nbio, bio, dma_dir, psegs) == 0)
goto mapping_failed;

cmnd->rw.flags = 1;
cmnd->rw.command_id = cmdid;
Expand All @@ -471,6 +472,11 @@ static int nvme_submit_bio_queue(struct nvme_queue *nvmeq, struct nvme_ns *ns,

return 0;

mapping_failed:
free_nbio(nvmeq, nbio);
bio_endio(bio, -ENOMEM);
return 0;

free_nbio:
free_nbio(nvmeq, nbio);
congestion:
Expand Down

0 comments on commit 6f70333

Please sign in to comment.