diff --git a/src/librbd/api/Mirror.cc b/src/librbd/api/Mirror.cc index 88e3bf80e66..56aa2cdb8d1 100644 --- a/src/librbd/api/Mirror.cc +++ b/src/librbd/api/Mirror.cc @@ -1860,7 +1860,7 @@ int Mirror::image_snapshot_create(I *ictx, uint64_t *snap_id) { if (mirror_image.mode != cls::rbd::MIRROR_IMAGE_MODE_SNAPSHOT || mirror_image.state != cls::rbd::MIRROR_IMAGE_STATE_ENABLED) { lderr(cct) << "snapshot based mirroring is not enabled" << dendl; - return r; + return -EINVAL; } C_SaferCond on_finish;