From 723146898de138324dd6e421af05fd61c6cda848 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Mon, 27 Apr 2009 20:19:11 +0200 Subject: [PATCH] Fix rm-hooks in case no post-remove hook was specified. Without the patch the following assertion was triggered upon removal of the second snapshot: dss: dss.c:229: pre_remove_hook: Assertion `!snapshot_currently_being_removed' failed. Thanks to Sebastian Stark who pointed out the issue. --- dss.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dss.c b/dss.c index cee49d6..c0597f3 100644 --- a/dss.c +++ b/dss.c @@ -568,7 +568,10 @@ static int handle_rm_exit(int status) snapshot_removal_status = HS_READY; return -E_BAD_EXIT_CODE; } - snapshot_removal_status = HS_SUCCESS; + if (conf.post_remove_hook_given) + snapshot_removal_status = HS_SUCCESS; + else + snapshot_removal_status = HS_READY; return 1; } -- 2.39.2