]> git.apps.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:35:16 +0000 (10:35 -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>
(cherry picked from commit b1312f94edc016e604f1d05ccfe2c788677f51d1)

src/rgw/rgw_rados.cc

index 31332b5993ec2daea8a94f01dfd762c3508b4f97..27f996ccdf59c61e5146a39474aebdcaf52b75bf 100644 (file)
@@ -1287,6 +1287,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;