Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360853
b: refs/heads/master
c: a07c48a
h: refs/heads/master
i:
  360851: 0ebcf54
v: v3
  • Loading branch information
Dan Carpenter authored and Tyler Hicks committed Jan 29, 2013
1 parent 2fa5fb4 commit 8121410
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 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: 111d61a25ec11c1837ac0fd81bf4b845d3327fb7
refs/heads/master: a07c48ad5be5cbf32a2741f10e6fbf4bbfcaa362
9 changes: 3 additions & 6 deletions trunk/fs/ecryptfs/crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,17 +301,14 @@ int virt_to_scatterlist(const void *addr, int size, struct scatterlist *sg,
while (size > 0 && i < sg_size) {
pg = virt_to_page(addr);
offset = offset_in_page(addr);
if (sg)
sg_set_page(&sg[i], pg, 0, offset);
sg_set_page(&sg[i], pg, 0, offset);
remainder_of_page = PAGE_CACHE_SIZE - offset;
if (size >= remainder_of_page) {
if (sg)
sg[i].length = remainder_of_page;
sg[i].length = remainder_of_page;
addr += remainder_of_page;
size -= remainder_of_page;
} else {
if (sg)
sg[i].length = size;
sg[i].length = size;
addr += size;
size = 0;
}
Expand Down

0 comments on commit 8121410

Please sign in to comment.