Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 286304
b: refs/heads/master
c: d0ba1e4
h: refs/heads/master
v: v3
  • Loading branch information
Matthew Wilcox committed Nov 4, 2011
1 parent a5dab53 commit 9f5ef19
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 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: 6413214c5d424fd5aae6567848340f962ad2ce0f
refs/heads/master: d0ba1e497bca83a3d353eb47c9658afc54d83228
10 changes: 5 additions & 5 deletions trunk/drivers/block/nvme.c
Original file line number Diff line number Diff line change
Expand Up @@ -996,11 +996,11 @@ static int nvme_map_user_pages(struct nvme_dev *dev, int write,

sg = kcalloc(count, sizeof(*sg), GFP_KERNEL);
sg_init_table(sg, count);
sg_set_page(&sg[0], pages[0], PAGE_SIZE - offset, offset);
length -= (PAGE_SIZE - offset);
for (i = 1; i < count; i++) {
sg_set_page(&sg[i], pages[i], min_t(int, length, PAGE_SIZE), 0);
length -= PAGE_SIZE;
for (i = 0; i < count; i++) {
sg_set_page(&sg[i], pages[i],
min_t(int, length, PAGE_SIZE - offset), offset);
length -= (PAGE_SIZE - offset);
offset = 0;
}

err = -ENOMEM;
Expand Down

0 comments on commit 9f5ef19

Please sign in to comment.