]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cls/rgw: return default header if not initialized
authorYehuda Sadeh <yehuda@redhat.com>
Thu, 4 May 2017 20:36:38 +0000 (13:36 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Mon, 5 Jun 2017 20:17:40 +0000 (13:17 -0700)
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/cls/rgw/cls_rgw.cc

index a39dfe38d8d4677e2e4e85ead100bca8154e2cd6..e7c732a712d04a7deb186b381b01a54ef61de587 100644 (file)
@@ -372,7 +372,8 @@ static int read_bucket_header(cls_method_context_t hctx, struct rgw_bucket_dir_h
     return rc;
 
   if (bl.length() == 0) {
-      return -ENOENT;
+      *header = rgw_bucket_dir_header();
+      return 0;
   }
   bufferlist::iterator iter = bl.begin();
   try {