]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc/objecter: fix return value of scrub_ls()
authorxie xingguo <xie.xingguo@zte.com.cn>
Tue, 23 Aug 2016 07:55:59 +0000 (15:55 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Tue, 23 Aug 2016 07:55:59 +0000 (15:55 +0800)
Set rval to 0 if scrub_ls is successful, negative error code otherwise.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/osdc/Objecter.cc

index 50b538da224020ea0d8ae2e69c336231f079c1a8..742ab02237da1a98f50dce6d874674071744c5d4 100644 (file)
@@ -5108,8 +5108,15 @@ namespace {
                               int *rval)
       : interval(interval), snapsets(snapsets), rval(rval) {}
     void finish(int r) override {
-      if (r < 0 && r != -EAGAIN)
+      if (r < 0 && r != -EAGAIN) {
+        if (rval)
+          *rval = r;
        return;
+      }
+
+      if (rval)
+        *rval = 0;
+
       try {
        decode();
       } catch (buffer::error&) {