]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: don't copy object idtag when copying object
authorYehuda Sadeh <yehuda@inktank.com>
Thu, 30 May 2013 16:34:21 +0000 (09:34 -0700)
committerGreg Farnum <greg@inktank.com>
Fri, 31 May 2013 17:10:42 +0000 (10:10 -0700)
Fixes: #5204
When copying object we ended up also copying the original
object idtag which overrode the newly generated one. When
refcount put is called with the wrong idtag the count
does't go down.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
src/rgw/rgw_rados.cc

index e74e532bdacd784ba64e511d7014a536f738f47c..12ed006c0cc7eeac5ccfb0bcbc3c2ced48ff3b69 100644 (file)
@@ -1319,6 +1319,7 @@ int RGWRados::copy_obj(void *ctx,
     /* copying attrs from source, however acls should not be copied */
     attrset[RGW_ATTR_ACL] = attrs[RGW_ATTR_ACL];
   }
+  attrset.erase(RGW_ATTR_ID_TAG);
 
   RGWObjManifest manifest;
   RGWObjState *astate = NULL;