From ed5a5e075544662a12d94e472da55aeb2f0efe5d Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Tue, 1 Apr 2014 10:51:20 -0700 Subject: [PATCH] rgw: reverse logic to identify next part Fixes: #7935 The check that identifies whether we need to move to the next part when iterating over an object was reversed. Signed-off-by: Yehuda Sadeh --- src/rgw/rgw_rados.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index cb82e05e225df..e06252b43597c 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -681,7 +681,7 @@ void RGWObjManifest::obj_iterator::operator++() stripe_ofs = part_ofs; /* move to the next rule? */ - if (next_rule_iter->second.start_ofs >= stripe_ofs) { + if (stripe_ofs >= next_rule_iter->second.start_ofs) { rule_iter = next_rule_iter; bool last_rule = (next_rule_iter == manifest->rules.end()); if (!last_rule) { -- 2.39.5