Skip to content

Commit

Permalink
Merge pull request #45315 from dang/wip-dang-fix-inverted
Browse files Browse the repository at this point in the history
quincy: RGW - Fix inverted return check

Reviewed-by: Casey Bodley <cbodley@redhat.com>
  • Loading branch information
yuriw committed Mar 18, 2022
2 parents 27f5c9b + c456668 commit 622a1fb
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/rgw/rgw_rados.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9203,15 +9203,14 @@ int RGWRados::check_disk_state(const DoutPrefixProvider *dpp,
list_state.meta.content_type = content_type;

librados::IoCtx head_obj_ctx; // initialize to data pool so we can get pool id
const bool head_pool_found =
get_obj_head_ioctx(dpp, bucket_info, obj, &head_obj_ctx);
if (head_pool_found) {
list_state.ver.pool = head_obj_ctx.get_id();
list_state.ver.epoch = astate->epoch;
} else {
int ret = get_obj_head_ioctx(dpp, bucket_info, obj, &head_obj_ctx);
if (ret < 0) {
ldpp_dout(dpp, 0) << __PRETTY_FUNCTION__ <<
" WARNING: unable to find head object data pool for \"" <<
obj << "\", not updating version pool/epoch" << dendl;
} else {
list_state.ver.pool = head_obj_ctx.get_id();
list_state.ver.epoch = astate->epoch;
}

if (astate->obj_tag.length() > 0) {
Expand Down

0 comments on commit 622a1fb

Please sign in to comment.