]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: combine calls to global_init/pre_init
authorCasey Bodley <cbodley@redhat.com>
Fri, 17 Apr 2020 14:49:53 +0000 (10:49 -0400)
committerCasey Bodley <cbodley@redhat.com>
Fri, 17 Apr 2020 14:49:58 +0000 (10:49 -0400)
calling global_init() without 'run_pre_init=false' will call
global_pre_init() for us

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_main.cc

index a3ca40e2cdf39b9d792eb5439d44de7b03116d2f..f9fd8bbb270638d19fa032ac7c6495d372425e5c 100644 (file)
@@ -203,17 +203,9 @@ int radosgw_Main(int argc, const char **argv)
   }
 
   int flags = CINIT_FLAG_UNPRIVILEGED_DAEMON_DEFAULTS;
-  global_pre_init(
-    &defaults, args, CEPH_ENTITY_TYPE_CLIENT, CODE_ENVIRONMENT_DAEMON,
-    flags);
-
-  // Now that we've determined which frontend(s) to use, continue with global
-  // initialization. Passing false as the final argument ensures that
-  // global_pre_init() is not invoked twice.
-  // claim the reference and release it after subsequent destructors have fired
   auto cct = global_init(&defaults, args, CEPH_ENTITY_TYPE_CLIENT,
                         CODE_ENVIRONMENT_DAEMON,
-                        flags, "rgw_data", false);
+                        flags, "rgw_data");
 
   // First, let's determine which frontends are configured.
   list<string> frontends;