]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw:returned value of function reuires exception handling 17041/head
authordengxiafubi <670318146@qq.com>
Wed, 16 Aug 2017 02:56:08 +0000 (10:56 +0800)
committerdengxiafubi <xhwcqupt@sina.com>
Wed, 16 Aug 2017 08:28:37 +0000 (16:28 +0800)
the returned value of rgw_bucket_set_attrs() reuires exception handling

Signed-off-by: dengxiafubi <xhwcqupt@sina.com>
src/rgw/rgw_op.cc

index c02b3d8396ddf4a3af5987feccfdb7d9f853a9e9..7ad65ed477167317ce2a66bb85f0d45bc880afcc 100644 (file)
@@ -4775,6 +4775,11 @@ void RGWDeleteLC::execute()
       }
     }
   op_ret = rgw_bucket_set_attrs(store, s->bucket_info, attrs, &s->bucket_info.objv_tracker);
+  if (op_ret < 0) {
+    ldout(s->cct, 0) << "RGWLC::RGWDeleteLC() failed to set attrs on bucket=" << s->bucket.name
+            << " returned err=" << op_ret << dendl;
+    return;
+  }
   string shard_id = s->bucket.name + ':' +s->bucket.bucket_id;
   pair<string, int> entry(shard_id, lc_uninitial);
   string oid;