]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cls/rbd: fix incorrect error log upon success
authorJason Dillaman <dillaman@redhat.com>
Mon, 29 Jan 2018 22:35:57 +0000 (17:35 -0500)
committerJason Dillaman <dillaman@redhat.com>
Mon, 5 Feb 2018 16:11:59 +0000 (11:11 -0500)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/cls/rbd/cls_rbd.cc

index fb9e246c76d87ceb779208304a69b3574947b7c2..78051c9ae42ce88b7093d812252459edbbd15af0 100644 (file)
@@ -5659,7 +5659,7 @@ int trash_get(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
   string key = trash::image_key(id);
   bufferlist bl;
   int r = cls_cxx_map_get_val(hctx, key, out);
-  if (r != -ENOENT) {
+  if (r < 0 && r != -ENOENT) {
     CLS_ERR("error reading image from trash '%s': '%s'", id.c_str(),
             cpp_strerror(r).c_str());
   }