diff options
Diffstat (limited to 'src/cls/rbd/cls_rbd.cc')
-rw-r--r-- | src/cls/rbd/cls_rbd.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cls/rbd/cls_rbd.cc b/src/cls/rbd/cls_rbd.cc index 12947a08540..adfe4626caa 100644 --- a/src/cls/rbd/cls_rbd.cc +++ b/src/cls/rbd/cls_rbd.cc @@ -1524,7 +1524,7 @@ static int dir_remove_image_helper(cls_method_context_t hctx, string name_key = dir_key_for_name(name); string id_key = dir_key_for_id(id); int r = read_key(hctx, name_key, &stored_id); - if (r < 0) { + if (r < 0 && r != -ENOENT) { CLS_ERR("error reading name to id mapping: %d", r); return r; } @@ -1618,7 +1618,7 @@ int dir_get_id(cls_method_context_t hctx, bufferlist *in, bufferlist *out) string id; int r = read_key(hctx, dir_key_for_name(name), &id); - if (r < 0) { + if (r < 0 && r != -ENOENT) { CLS_ERR("error reading id for name '%s': %d", name.c_str(), r); return r; } |