]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix RGWSystemMetaObj::init to handle perdefined name correctly
authorOrit Wasserman <owasserm@redhat.com>
Tue, 19 Jan 2016 14:09:35 +0000 (15:09 +0100)
committerYehuda Sadeh <yehuda@redhat.com>
Fri, 12 Feb 2016 00:13:55 +0000 (16:13 -0800)
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
src/rgw/rgw_rados.cc

index f323287f7b02c3790aedbd184f196e90c2d54727..02aca1eed5466632c05415c0141c0417169b4b51 100644 (file)
@@ -377,11 +377,11 @@ int RGWSystemMetaObj::init(CephContext *_cct, RGWRados *_store, bool setup_obj,
     int r;
     if (name.empty()) {
       name = get_predefined_name(cct);
-      if (id.empty()) {
-       r = use_default(old_format);
-       if (r < 0) {
-         return r;
-       }
+    }
+    if (name.empty()) {
+      r = use_default(old_format);
+      if (r < 0) {
+       return r;
       }
     } else if (!old_format) {
       r = read_id(name, id);
@@ -1041,7 +1041,6 @@ int RGWPeriod::read_info()
   rgw_bucket pool(pool_name.c_str());
   bufferlist bl;
 
-
   RGWObjectCtx obj_ctx(store);
   int ret = rgw_get_system_obj(store, obj_ctx, pool, get_period_oid(), bl, NULL, NULL);
   if (ret < 0) {