From dd0eb719a50e9fb24eca5a840c2e8adb53be41b2 Mon Sep 17 00:00:00 2001 From: runsisi Date: Thu, 28 Apr 2016 09:05:33 +0800 Subject: [PATCH] librbd: fix potential assertion for object map invalidation if update_flags fails we should not go any further, or the async request will be removed from m_image_ctx.async_requests twice Signed-off-by: runsisi --- src/librbd/object_map/InvalidateRequest.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/librbd/object_map/InvalidateRequest.cc b/src/librbd/object_map/InvalidateRequest.cc index 3566fdd99a7..41ef46cdf58 100644 --- a/src/librbd/object_map/InvalidateRequest.cc +++ b/src/librbd/object_map/InvalidateRequest.cc @@ -47,6 +47,7 @@ void InvalidateRequest::send() { r = image_ctx.update_flags(m_snap_id, flags, true); if (r < 0) { this->async_complete(r); + return; } // do not update on-disk flags if not image owner -- 2.39.5