summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda.sadeh@dreamhost.com>2012-04-03 11:30:57 -0700
committerYehuda Sadeh <yehuda.sadeh@dreamhost.com>2012-04-03 11:30:57 -0700
commitebb487a617df5cf4d90c1aa8ba87ed23b51de8c3 (patch)
tree5026c88cdd48d7dd7ca5317f2940a8835a89d5e2
parenta8938422a4a6ed6626cc1d24b45a3b0cedfb9f08 (diff)
downloadceph-ebb487a617df5cf4d90c1aa8ba87ed23b51de8c3.tar.gz
cls_rgw: reset return code in some cases
Beforehand the return code was ignored, so fixed the cases where we erroneously return error instead of success. Signed-off-by: Yehuda Sadeh <yehuda.sadeh@dreamhost.com>
-rw-r--r--src/cls_rgw.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cls_rgw.cc b/src/cls_rgw.cc
index fd2e4d797e6..85603fad641 100644
--- a/src/cls_rgw.cc
+++ b/src/cls_rgw.cc
@@ -140,6 +140,8 @@ int rgw_bucket_prepare_op(cls_method_context_t hctx, bufferlist *in, bufferlist
if (rc < 0 && rc != -ENOENT)
return rc;
+ rc = 0;
+
struct rgw_bucket_dir_entry entry;
if (rc != -ENOENT) {
bufferlist::iterator biter = cur_value.begin();
@@ -198,6 +200,7 @@ int rgw_bucket_complete_op(cls_method_context_t hctx, bufferlist *in, bufferlist
if (rc != -ENOENT) {
return rc;
} else {
+ rc = 0;
entry.name = op.name;
entry.epoch = op.epoch;
entry.meta = op.meta;