]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: rgw_op: exit early if object has no attrs in GetObjectTagging 17048/head
authorAbhishek Lekshmanan <abhishek@suse.com>
Wed, 16 Aug 2017 12:56:59 +0000 (14:56 +0200)
committerAbhishek Lekshmanan <abhishek@suse.com>
Wed, 16 Aug 2017 13:29:10 +0000 (15:29 +0200)
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 <abhishek@suse.com>
src/rgw/rgw_op.cc

index 985076c7224bd497205c4100d9fcced1ae802e42..ad663973620d864a87cfde93d1cdf40fed1f92f4 100644 (file)
@@ -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;