From: Jason Dillaman Date: Mon, 29 Jan 2018 22:35:57 +0000 (-0500) Subject: cls/rbd: fix incorrect error log upon success X-Git-Tag: v13.0.2~327^2~22 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=65239d64a587128d708590745ee7dbc206f95306;p=ceph.git cls/rbd: fix incorrect error log upon success Signed-off-by: Jason Dillaman --- diff --git a/src/cls/rbd/cls_rbd.cc b/src/cls/rbd/cls_rbd.cc index fb9e246c76d..78051c9ae42 100644 --- a/src/cls/rbd/cls_rbd.cc +++ b/src/cls/rbd/cls_rbd.cc @@ -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()); }