]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix logic related to operations on different region
authorYehuda Sadeh <yehuda@inktank.com>
Fri, 7 Jun 2013 01:50:27 +0000 (18:50 -0700)
committerYehuda Sadeh <yehuda@inktank.com>
Mon, 10 Jun 2013 21:28:03 +0000 (14:28 -0700)
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
src/rgw/rgw_op.cc

index f2e97d19810f47e18994c252b15327e595b642c4..d540fd605bed9ae7498d3028d1baead9001766dd 100644 (file)
@@ -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;
     }