]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd: remove unused condition 12723/head
authorGaurav Kumar Garg <garg.gaurav52@gmail.com>
Fri, 30 Dec 2016 10:31:00 +0000 (11:31 +0100)
committerGaurav Kumar Garg <garg.gaurav52@gmail.com>
Fri, 30 Dec 2016 10:33:42 +0000 (11:33 +0100)
Signed-off-by: Gaurav Kumar Garg <garg.gaurav52@gmail.com>
src/tools/rbd/action/Group.cc

index 5a8dcd532560b325ed9aadfac096057009237506..6fbaefdee6df4c050c4a7ec2f047d4528f59fdc1 100644 (file)
@@ -261,11 +261,13 @@ int execute_list_images(const po::variables_map &vm) {
 
   if (r == -ENOENT)
     r = 0;
+
   if (r < 0)
     return r;
 
   if (f)
     f->open_array_section("consistency_groups");
+
   for (auto i : images) {
     std::string image_name = i.name;
     int64_t pool_id = i.pool;
@@ -274,8 +276,6 @@ int execute_list_images(const po::variables_map &vm) {
     if (cls::rbd::GROUP_IMAGE_LINK_STATE_INCOMPLETE == state) {
       state_string = "incomplete";
     }
-    if (r < 0)
-      return r;
     if (f) {
       f->dump_string("image name", image_name);
       f->dump_int("pool id", pool_id);
@@ -283,6 +283,7 @@ int execute_list_images(const po::variables_map &vm) {
     } else
       std::cout << pool_id << "." << image_name << " " << state_string << std::endl;
   }
+
   if (f) {
     f->close_section();
     f->flush(std::cout);