diff options
author | Alex Elder <elder@inktank.com> | 2012-10-10 21:19:13 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-17 08:46:49 -0800 |
commit | 2042c7c78b7819daff3033ef4868c8dc7fc34a09 (patch) | |
tree | 409fbc0b97ac4a45b7f04311ce34fa15a26953d6 /lib/pm-notifier-error-inject.c | |
parent | 38f14fd492d3a7d2d096795f2e457d556a6b2f95 (diff) |
rbd: zero return code in rbd_dev_image_id()
(cherry picked from commit a0ea3a40fd20b8c66381f747c454f89d6d1f50d4)
When rbd_dev_probe() calls rbd_dev_image_id() it expects to get
a 0 return code if successful, but it is getting a positive value.
The reason is that rbd_dev_image_id() returns the value it gets from
rbd_req_sync_exec(), which returns the number of bytes read in as a
result of the request. (This ultimately comes from
ceph_copy_from_page_vector() in rbd_req_sync_op()).
Force the return value to 0 when successful in rbd_dev_image_id().
Do the same in rbd_dev_v2_object_prefix().
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/pm-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions