From: Abhishek Lekshmanan Date: Wed, 16 Aug 2017 12:56:59 +0000 (+0200) Subject: rgw: rgw_op: exit early if object has no attrs in GetObjectTagging X-Git-Tag: v13.0.0~52^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F17048%2Fhead;p=ceph.git rgw: rgw_op: exit early if object has no attrs in GetObjectTagging Check for the return value of get_obj_attrs and exit earlier in case of errors Fixes: http://tracker.ceph.com/issues/21010 Signed-off-by: Abhishek Lekshmanan --- diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index 985076c7224b..ad663973620d 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -720,6 +720,12 @@ void RGWGetObjTags::execute() store->set_atomic(s->obj_ctx, obj); op_ret = get_obj_attrs(store, s, obj, attrs); + if (op_ret < 0) { + ldout(s->cct, 0) << "ERROR: failed to get obj attrs, obj=" << obj + << " ret=" << op_ret << dendl; + return; + } + auto tags = attrs.find(RGW_ATTR_TAGS); if(tags != attrs.end()){ has_tags = true;