]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cls/rgw_gc: Fixing the iterator used to access urgent data map 36017/head
authorPritha Srivastava <prsrivas@redhat.com>
Fri, 8 May 2020 18:51:46 +0000 (00:21 +0530)
committerNathan Cutler <ncutler@suse.com>
Fri, 10 Jul 2020 18:44:16 +0000 (20:44 +0200)
in xattr in cls_rgw_gc. The incorrect iterator caused a crash
in osd.

Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
(cherry picked from commit d5b895498ef921ed840f05de95eabe6b2f806e4b)

src/cls/rgw_gc/cls_rgw_gc.cc

index f45fb2df22fc9c4a8b36d9decd7d7eddc53488aa..bb3c2ffc1576b3f3e4b0de20d6a1bc800f3d588d 100644 (file)
@@ -426,7 +426,7 @@ static int cls_rgw_gc_queue_update_entry(cls_method_context_t hctx, bufferlist *
       } //end - catch
       auto xattr_iter = xattr_urgent_data_map.find(op.info.tag);
       if (xattr_iter != xattr_urgent_data_map.end()) {
-        it->second = op.info.time;
+        xattr_iter->second = op.info.time;
         tag_found = true;
         //write the updated map back
         bufferlist bl_map;