]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cls/rgw: unlink_instance writes updated olh log on early return
authorCasey Bodley <cbodley@redhat.com>
Wed, 2 Sep 2020 15:38:29 +0000 (11:38 -0400)
committerCasey Bodley <cbodley@redhat.com>
Wed, 2 Sep 2020 17:13:42 +0000 (13:13 -0400)
Fixes: https://tracker.ceph.com/issues/47240
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/cls/rgw/cls_rgw.cc

index cd5e66f401b2743c0c472be50e5bb5a1bba9c5a4..e4fa821d4ff1c53bb16831e860f6adc043c7f25f 100644 (file)
@@ -1771,11 +1771,12 @@ static int rgw_bucket_unlink_instance(cls_method_context_t hctx, bufferlist *in,
       return ret;
     }
 
-    if (!obj.is_delete_marker()) {
-      olh.update_log(CLS_RGW_OLH_OP_REMOVE_INSTANCE, op.op_tag, op.key, false, op.olh_epoch);
+    if (obj.is_delete_marker()) {
+      return 0;
     }
 
-    return 0;
+    olh.update_log(CLS_RGW_OLH_OP_REMOVE_INSTANCE, op.op_tag, op.key, false, op.olh_epoch);
+    return olh.write();
   }
 
   rgw_bucket_olh_entry& olh_entry = olh.get_entry();