]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cls/rgw/cls_rgw.cc: fix multiple lastest version problem 38086/head
authorRuan Zitao <ruanzitao@kuaishou.com>
Wed, 21 Oct 2020 03:06:40 +0000 (11:06 +0800)
committerRuan Zitao <ruanzitao@kuaishou.com>
Wed, 2 Dec 2020 02:47:48 +0000 (10:47 +0800)
Fixes: https://tracker.ceph.com/issues/47919
Signed-off-by: Ruan Zitao <ruanzitao@kuaishou.com>
Signed-off-by: Yang Honggang <yanghonggang@kuaishou.com>
(cherry picked from commit f60f9ace1a4bceeda256373cf4603058e1947fa8)

src/cls/rgw/cls_rgw.cc

index cba9a2d73492ad029614bd3b5a83d91cd134c091..788a040e1816c03892eeef0822c567db01968ef2 100644 (file)
@@ -968,9 +968,7 @@ int rgw_bucket_complete_op(cls_method_context_t hctx, bufferlist *in, bufferlist
   entry.index_ver = header.ver;
   /* resetting entry flags, entry might have been previously a delete
    * marker */
-  entry.flags = (entry.key.instance.empty() ?
-                0 :
-                rgw_bucket_dir_entry::FLAG_VER);
+  entry.flags &= rgw_bucket_dir_entry::FLAG_VER;
 
   if (op.tag.size()) {
     map<string, rgw_bucket_pending_info>::iterator pinter = entry.pending_map.find(op.tag);