]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw: destroy get_obj handle in copy_obj()
authorYehuda Sadeh <yehuda@inktank.com>
Mon, 16 Sep 2013 21:35:25 +0000 (14:35 -0700)
committerSage Weil <sage@inktank.com>
Tue, 24 Sep 2013 16:01:17 +0000 (09:01 -0700)
commit9dc5f15fbae22244ad1f62925e17c9d81e856e55
tree818574c235c2f7bcbedf577b97e3bbe5f00bb600
parent471233e98a9f64ad513a4a196b7661b80534cb00
rgw: destroy get_obj handle in copy_obj()

Fixes: #6176
Backport: dumpling
We take different code paths in copy_obj, make sure we close the handle
when we exit the function. Move the call to finish_get_obj() out of
copy_obj_data() as we don't create the handle there, so that should
makes code less confusing and less prone to errors.
Also, note that RGWRados::get_obj() also calls finish_get_obj(). For
everything to work in concert we need to pass a pointer to the handle
and not the handle itself. Therefore we needed to also change the call
to copy_obj_data().

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
(cherry picked from commit 9e98620e4325d15c88440a890b267131613e1aa1)
src/rgw/rgw_rados.cc
src/rgw/rgw_rados.h