]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/swift: don't crash on nonexistent bucket in BulkUpload 44617/head
authorCasey Bodley <cbodley@redhat.com>
Mon, 17 Jan 2022 19:45:28 +0000 (14:45 -0500)
committerCasey Bodley <cbodley@redhat.com>
Mon, 17 Jan 2022 19:59:01 +0000 (14:59 -0500)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_op.cc

index 89f579228f63e271cd4353a1d3f0bbd79fc3d782..bc7429335f79b2a6d58d4cf410144d82bb4ac3ae 100644 (file)
@@ -7389,9 +7389,10 @@ int RGWBulkUploadOp::handle_file(const std::string_view path,
   ACLOwner bowner;
 
   op_ret = store->get_bucket(this, s->user.get(), rgw_bucket(rgw_bucket_key(s->user->get_tenant(), bucket_name)), &bucket, y);
-  if (op_ret == -ENOENT) {
-    ldpp_dout(this, 20) << "non existent directory=" << bucket_name << dendl;
-  } else if (op_ret < 0) {
+  if (op_ret < 0) {
+    if (op_ret == -ENOENT) {
+      ldpp_dout(this, 20) << "non existent directory=" << bucket_name << dendl;
+    }
     return op_ret;
   }