From: Alex Elder Date: Sun, 21 Apr 2013 17:14:45 +0000 (-0500) Subject: rbd: have rbd_obj_method_sync() return transfer count X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~26^2~67 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57385b51c3ffd0fed2dd9d5d8e4ec080c85ecbcd;p=pandora-kernel.git rbd: have rbd_obj_method_sync() return transfer count Callers of rbd_obj_method_sync() don't know how many bytes of data got returned by the class method call. As a result, they have been assuming enough got returned to decode whatever was expected. This isn't safe. We know how many bytes got transferred, so have rbd_obj_method_sync() return that amount (rather than just 0) if the call is successful. Change all callers to use this return value to ensure decoding of the results is done safely. On the other hand, most callers of rbd_obj_method_sync() only indicate success or failure, so all of *their* callers can simply test for non-zero result. This resolves: http://tracker.ceph.com/issues/4773 Signed-off-by: Alex Elder Reviewed-by: Josh Durgin --- Reading git-diff-tree failed