In case need_stats is set on rgw_read_user_buckets() and the
update_containers_stats() call fails with !-ENOENT, not only
print out a message but also return the error to the function
caller.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
if (need_stats) {
map<string, RGWBucketEnt>& m = buckets.get_buckets();
- int r = store->update_containers_stats(m);
- if (r < 0) {
+ ret = store->update_containers_stats(m);
+ if (ret < 0 && ret != -ENOENT) {
ldout(store->ctx(), 0) << "ERROR: could not get stats for buckets" << dendl;
+ return ret;
}
}
return 0;