]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cls_rgw: fix rgw_bucket_init_index
authorYehuda Sadeh <yehuda@hq.newdream.net>
Thu, 8 Mar 2012 06:25:47 +0000 (22:25 -0800)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Thu, 8 Mar 2012 06:25:47 +0000 (22:25 -0800)
was failing to error in case header already existed

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
src/cls_rgw.cc

index cb5716b495e256a5a54b74016e60ee89299daf0a..52d03cd6629ee3a8141087d8738bcf1516346ed2 100644 (file)
@@ -106,6 +106,7 @@ int rgw_bucket_init_index(cls_method_context_t hctx, bufferlist *in, bufferlist
 
   if (header_bl.length() != 0) {
     CLS_LOG("ERROR: index already initialized\n");
+    return -EINVAL;
   }
 
   rgw_bucket_dir dir;