Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359674
b: refs/heads/master
c: 1ceae7e
h: refs/heads/master
v: v3
  • Loading branch information
Alex Elder committed Feb 20, 2013
1 parent 0be12b4 commit 8916e66
Show file tree
Hide file tree
Showing 2 changed files with 6 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: b324814e8436772cb3367b14149ba003a9954525
refs/heads/master: 1ceae7ef0fd00c965a2257c6e9eb497ca91f01c7
6 changes: 5 additions & 1 deletion trunk/drivers/block/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2048,6 +2048,7 @@ static int rbd_obj_read_sync(struct rbd_device *rbd_dev,
struct ceph_osd_client *osdc;
struct page **pages = NULL;
u32 page_count;
size_t size;
int ret;

page_count = (u32) calc_pages_for(offset, length);
Expand Down Expand Up @@ -2084,7 +2085,10 @@ static int rbd_obj_read_sync(struct rbd_device *rbd_dev,
ret = obj_request->result;
if (ret < 0)
goto out;
ret = ceph_copy_from_page_vector(pages, buf, 0, obj_request->xferred);

rbd_assert(obj_request->xferred <= (u64) SIZE_MAX);
size = (size_t) obj_request->xferred;
ret = ceph_copy_from_page_vector(pages, buf, 0, size);
if (version)
*version = obj_request->version;
out:
Expand Down

0 comments on commit 8916e66

Please sign in to comment.