From: Yehuda Sadeh Date: Fri, 7 Jun 2013 01:50:27 +0000 (-0700) Subject: rgw: fix logic related to operations on different region X-Git-Tag: v0.67-rc1~128^2~79 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bf6b80c67765d08f669a6e51eafb6758e1adff1a;p=ceph.git rgw: fix logic related to operations on different region Signed-off-by: Yehuda Sadeh --- diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index f2e97d19810..d540fd605be 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -316,8 +316,8 @@ static int rgw_build_policies(RGWRados *store, struct req_state *s, bool only_bu s->bucket_owner = s->bucket_acl->get_owner(); string& region = bucket_info.region; - if (exists && (region.empty() && !store->region.is_master) && - (region != store->region.name)) { + if (exists && ((region.empty() && !store->region.is_master) || + (region != store->region.name))) { ldout(s->cct, 0) << "NOTICE: request for data in a different region (" << region << " != " << store->region.name << ")" << dendl; return -ERR_PERMANENT_REDIRECT; }