ret = obj_request->result;
if (ret < 0)
goto out;
- ret = ceph_copy_from_page_vector(pages, inbound, 0,
+ ret = 0;
+ (void) ceph_copy_from_page_vector(pages, inbound, 0,
obj_request->xferred);
if (version)
*version = obj_request->version;
rbd_assert(obj_request->xferred <= (u64) SIZE_MAX);
size = (size_t) obj_request->xferred;
- ret = ceph_copy_from_page_vector(pages, buf, 0, size);
+ (void) ceph_copy_from_page_vector(pages, buf, 0, size);
+ rbd_assert(size <= (size_t) INT_MAX);
+ ret = (int) size;
if (version)
*version = obj_request->version;
out:
ret = rbd_obj_read_sync(rbd_dev, rbd_dev->header_name,
0, size,
(char *) ondisk, version);
-
if (ret < 0)
goto out_err;
if (WARN_ON((size_t) ret < size)) {
dout("%s: rbd_obj_method_sync returned %d\n", __func__, ret);
if (ret < 0)
goto out;
- ret = 0; /* rbd_obj_method_sync() can return positive */
p = reply_buf;
rbd_dev->header.object_prefix = ceph_extract_encoded_string(&p,
dout("%s: rbd_obj_method_sync returned %d\n", __func__, ret);
if (ret < 0)
goto out;
- ret = 0; /* rbd_obj_method_sync() can return positive */
p = response;
rbd_dev->spec->image_id = ceph_extract_encoded_string(&p,