mirror of
https://github.com/ceph/ceph
synced 2026-08-02 07:03:18 +00:00
Merge pull request #69821 from sunyuechi/wip-rgw-inverted-checks
rgw: fix three inverted condition checks Reviewed-by: Daniel Gryniewicz <dang1@ibm.com>
This commit is contained in:
commit
8131835af8
@ -4713,7 +4713,7 @@ int POSIXAtomicWriter::complete(size_t accounted_size, const std::string& etag,
|
||||
if (if_nomatch) {
|
||||
if (strcmp(if_nomatch, "*") == 0) {
|
||||
// test the object is not existing
|
||||
if (!exists) {
|
||||
if (exists) {
|
||||
return -ERR_PRECONDITION_FAILED;
|
||||
}
|
||||
} else {
|
||||
|
||||
@ -8282,7 +8282,7 @@ void RGWDeleteMultiObj::execute(optional_yield y)
|
||||
bool has_versioned = false;
|
||||
for (auto object : multi_delete->objects) {
|
||||
const string& instance = object.get_version_id();
|
||||
if (instance.empty()) {
|
||||
if (!instance.empty()) {
|
||||
has_versioned = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -279,7 +279,7 @@ int AssumeRoleRequest::validate_input(const DoutPrefixProvider *dpp) const
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
if (! tokenCode.empty() && tokenCode.size() == TOKEN_CODE_SIZE) {
|
||||
if (! tokenCode.empty() && tokenCode.size() != TOKEN_CODE_SIZE) {
|
||||
ldpp_dout(dpp, 0) << "Either token code is empty or token code size is invalid: " << tokenCode.size() << dendl;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user