]> git.baikalelectronics.ru Git - kernel.git/commit
rbd: use rbd_obj_method_sync() return value
authorAlex Elder <elder@inktank.com>
Thu, 25 Apr 2013 20:09:42 +0000 (15:09 -0500)
committerSage Weil <sage@inktank.com>
Thu, 2 May 2013 04:19:31 +0000 (21:19 -0700)
commit99ddd531f67a4feba4d29d0d116dc4743d42ced0
tree71d11c256505ef1e529a04ace59968c2069f956b
parenta878896f79036209c37620a13370f8c8c5d8556b
rbd: use rbd_obj_method_sync() return value

Now that rbd_obj_method_sync() returns the number of bytes
returned by the method call, that value should be used by
callers to ensure we don't overrun the valid portion of the
buffer.

Fix the two spots that remained that weren't doing that,
rbd_dev_image_name() and rbd_dev_v2_snap_name().

Rearrange the error path slightly in rbd_dev_v2_snap_name().

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