rgw: a few coding fix-ups

Adds some code documentation and nudges code towards ceph coding
standards.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
This commit is contained in:
J. Eric Ivancich 2021-11-11 11:13:01 -05:00
parent 037ce8c4dd
commit 5c624489f4

View 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) {