]> Pileus Git - ~andy/linux/commit
rbd: ignore result of ceph_copy_from_page_vector()
authorAlex Elder <elder@inktank.com>
Wed, 6 Feb 2013 19:11:38 +0000 (13:11 -0600)
committerAlex Elder <elder@inktank.com>
Wed, 20 Feb 2013 01:14:05 +0000 (19:14 -0600)
commit23ed6e13b320b33decb516cbe66e71b132df488d
tree0e1cf9b6a06f1c5bd7ef3b2b8d40c566e607ef12
parent1ceae7ef0fd00c965a2257c6e9eb497ca91f01c7
rbd: ignore result of ceph_copy_from_page_vector()

The result of ceph_copy_from_page_vector() is simply the length
argument it is provided.

This is called by rbd_obj_method_sync(), which returns the result if
it's non-negative.  But we always either ignore or overwrite that
return value.  So explicitly ignore what's returned by the copy
function, and have rbd_obj_method_sync() always return either a
negative errno or 0.

We also return the result of ceph_copy_from_page_vector() in
rbd_obj_read_sync().  There we still want to return the number of
bytes transferred, but we can use the value we already have in hand
rather than what ceph_copy_from_page_vector() provides.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
drivers/block/rbd.c