]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: a few coding fix-ups
authorJ. Eric Ivancich <ivancich@redhat.com>
Thu, 11 Nov 2021 16:13:01 +0000 (11:13 -0500)
committerJ. Eric Ivancich <ivancich@redhat.com>
Fri, 12 Nov 2021 16:49:46 +0000 (11:49 -0500)
Adds some code documentation and nudges code towards ceph coding
standards.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
src/rgw/rgw_sal_rados.cc

index 1bf8417d186a5d4acf124dbe2bbba4652e7d0084..65f5b6470b5cd034b87177125080b8b9174ac9b8 100644 (file)
@@ -369,8 +369,9 @@ int RadosBucket::remove_bucket(const DoutPrefixProvider* dpp,
 
   // Refresh info
   ret = load_bucket(dpp, y);
-  if (ret < 0)
+  if (ret < 0) {
     return ret;
+  }
 
   ListParams params;
   params.list_versions = true;
@@ -382,8 +383,9 @@ int RadosBucket::remove_bucket(const DoutPrefixProvider* dpp,
     results.objs.clear();
 
     ret = list(dpp, params, 1000, results, y);
-    if (ret < 0)
+    if (ret < 0) {
       return ret;
+    }
 
     if (!results.objs.empty() && !delete_children) {
       ldpp_dout(dpp, -1) << "ERROR: could not remove non-empty bucket " << info.bucket.name <<
@@ -560,8 +562,8 @@ int RadosBucket::remove_bucket_bypass_gc(int concurrent_max, bool
         max_aio = concurrent_max;
       }
       obj_ctx.invalidate(obj->get_obj());
-    } // for all RGW objects
-  }
+    } // for all RGW objects in results
+  } // while is_truncated
 
   ret = handles->drain();
   if (ret < 0) {