]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cls/rgw/cls_rgw.cc: fix multiple lastest version problem 37733/head
authorRuan Zitao <ruanzitao@kuaishou.com>
Wed, 21 Oct 2020 03:06:40 +0000 (11:06 +0800)
committerRuan Zitao <ruanzitao@kuaishou.com>
Wed, 21 Oct 2020 03:26:27 +0000 (11:26 +0800)
Fixes: https://tracker.ceph.com/issues/47919
Signed-off-by: Ruan Zitao <ruanzitao@kuaishou.com>
Signed-off-by: Yang Honggang <yanghonggang@kuaishou.com>
src/cls/rgw/cls_rgw.cc

index c36e31c301a07bceaf99195ec15d8910f9dcae2c..6b815ade7bdfbc73ca397ef1a9300ad4cad1e68d 100644 (file)
@@ -981,9 +981,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()) {
     auto pinter = entry.pending_map.find(op.tag);