Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 361683
b: refs/heads/master
c: 2b19603
h: refs/heads/master
i:
  361681: 5b375df
  361679: e0f0f12
v: v3
  • Loading branch information
Keith Busch authored and Matthew Wilcox committed Nov 13, 2012
1 parent a8eced2 commit d8dd349
Show file tree
Hide file tree
Showing 2 changed files with 4 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: 6ecec74520d8a357726e6c12f99080dbe7b347dd
refs/heads/master: 2b1960341576bf51c01b12fefeb1cc53820923e7
4 changes: 3 additions & 1 deletion trunk/drivers/block/nvme.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ nvme_alloc_iod(unsigned nseg, unsigned nbytes, gfp_t gfp)
iod->offset = offsetof(struct nvme_iod, sg[nseg]);
iod->npages = -1;
iod->length = nbytes;
iod->nents = 0;
}

return iod;
Expand Down Expand Up @@ -377,7 +378,8 @@ static void bio_completion(struct nvme_dev *dev, void *ctx,
struct bio *bio = iod->private;
u16 status = le16_to_cpup(&cqe->status) >> 1;

dma_unmap_sg(&dev->pci_dev->dev, iod->sg, iod->nents,
if (iod->nents)
dma_unmap_sg(&dev->pci_dev->dev, iod->sg, iod->nents,
bio_data_dir(bio) ? DMA_TO_DEVICE : DMA_FROM_DEVICE);
nvme_free_iod(dev, iod);
if (status) {
Expand Down

0 comments on commit d8dd349

Please sign in to comment.