From: Alex Elder Date: Thu, 11 Oct 2012 04:19:13 +0000 (-0700) Subject: rbd: zero return code in rbd_dev_image_id() X-Git-Tag: v3.8-rc1~21^2~57 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a0ea3a40fd20b8c66381f747c454f89d6d1f50d4;p=pandora-kernel.git rbd: zero return code in rbd_dev_image_id() 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 Reviewed-by: Josh Durgin Reviewed-by: Dan Mick --- Reading git-diff-tree failed