From 8255344c3fe023bde18aa06e0f860752445d0735 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 1 Sep 2019 19:31:40 +0200 Subject: [PATCH] prune Simplify rm exit code logic. We can rely on the fact that wait_for_remove_process() sets snapshot_removal_status to the correct value on success. --- dss.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dss.c b/dss.c index db45449..126c366 100644 --- a/dss.c +++ b/dss.c @@ -1686,11 +1686,9 @@ rm: ret = wait_for_remove_process(); if (ret < 0) goto out; - if (snapshot_removal_status != HS_SUCCESS) - goto out; + assert(snapshot_removal_status == HS_SUCCESS); post_remove_hook(); - if (snapshot_removal_status != HS_POST_RUNNING) - goto out; + assert(snapshot_removal_status == HS_POST_RUNNING); ret = wait_for_remove_process(); if (ret < 0) goto out; -- 2.39.5