From: Casey Bodley Date: Wed, 5 Apr 2017 20:19:57 +0000 (-0400) Subject: rgw: fix for null version_id in fetch_remote_obj() X-Git-Tag: v11.2.1~73^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8f81bb33c7791c46db5e4db1ee45ab02a70580d9;p=ceph.git rgw: fix for null version_id in fetch_remote_obj() commit 8b43c9781206c22d9aedb4beb8d669bf1e23169f fixed the wrong use of the dest_obj's version, but removed the check for "null" version Signed-off-by: Casey Bodley (cherry picked from commit 915370776df5b964c2ee8d9f9329562919eef8d5) --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 9e329fc73a5..3501a4a4f69 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -7061,7 +7061,7 @@ int RGWRados::fetch_remote_obj(RGWObjectCtx& obj_ctx, RGWPutObjProcessor_Atomic processor(obj_ctx, dest_bucket_info, dest_obj.bucket, dest_obj.get_orig_obj(), cct->_conf->rgw_obj_stripe_size, tag, dest_bucket_info.versioning_enabled()); - if (version_id) { + if (version_id && *version_id != "null") { processor.set_version_id(*version_id); } processor.set_olh_epoch(olh_epoch);