Skip to content

Commit d9ac8f2

Browse files
authored
Merge pull request ceph#45225 from dang/wip-dang-fix-inverted
RGW - Fix inverted return check Reviewed-by: Eric Ivancich <[email protected]>
2 parents 4ba375e + 988c09d commit d9ac8f2

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/rgw/rgw_rados.cc

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9210,15 +9210,14 @@ int RGWRados::check_disk_state(const DoutPrefixProvider *dpp,
92109210
list_state.meta.content_type = content_type;
92119211

92129212
librados::IoCtx head_obj_ctx; // initialize to data pool so we can get pool id
9213-
const bool head_pool_found =
9214-
get_obj_head_ioctx(dpp, bucket_info, obj, &head_obj_ctx);
9215-
if (head_pool_found) {
9216-
list_state.ver.pool = head_obj_ctx.get_id();
9217-
list_state.ver.epoch = astate->epoch;
9218-
} else {
9213+
int ret = get_obj_head_ioctx(dpp, bucket_info, obj, &head_obj_ctx);
9214+
if (ret < 0) {
92199215
ldpp_dout(dpp, 0) << __PRETTY_FUNCTION__ <<
92209216
" WARNING: unable to find head object data pool for \"" <<
92219217
obj << "\", not updating version pool/epoch" << dendl;
9218+
} else {
9219+
list_state.ver.pool = head_obj_ctx.get_id();
9220+
list_state.ver.epoch = astate->epoch;
92229221
}
92239222

92249223
if (astate->obj_tag.length() > 0) {

0 commit comments

Comments
 (0)