From 9abd966a806dc88848c88ef6aca47f45d5c5edad Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Fri, 30 Oct 2009 13:07:49 +0000 Subject: [PATCH] Insert some missing stack macros into activation code. --- WHATS_NEW | 1 + lib/activate/activate.c | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index c18b720fc..4eecc3ee4 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.55 - =================================== + Insert some missing stack macros into activation code. Recognise DRBD device part and handle it similar to MD devices. Version 2.02.54 - 26th October 2009 diff --git a/lib/activate/activate.c b/lib/activate/activate.c index deccdc40f..b3a70db1d 100644 --- a/lib/activate/activate.c +++ b/lib/activate/activate.c @@ -936,7 +936,7 @@ static int _lv_resume(struct cmd_context *cmd, const char *lvid_s, return 1; if (!(lv = lv_from_lvid(cmd, lvid_s, 0))) - goto out; + goto_out; if (test_mode()) { _skip("Resuming '%s'.", lv->name); @@ -949,11 +949,11 @@ static int _lv_resume(struct cmd_context *cmd, const char *lvid_s, if (!info.exists || !info.suspended) { r = error_if_not_active ? 0 : 1; - goto out; + goto_out; } if (!_lv_activate_lv(lv)) - goto out; + goto_out; memlock_dec(); fs_unlock(); @@ -1138,7 +1138,8 @@ static int _lv_activate(struct cmd_context *cmd, const char *lvid_s, lv->status |= ACTIVATE_EXCL; memlock_inc(); - r = _lv_activate_lv(lv); + if (!(r = _lv_activate_lv(lv))) + stack; memlock_dec(); fs_unlock(); @@ -1155,13 +1156,19 @@ out: /* Activate LV */ int lv_activate(struct cmd_context *cmd, const char *lvid_s, int exclusive) { - return _lv_activate(cmd, lvid_s, exclusive, 0); + if (!_lv_activate(cmd, lvid_s, exclusive, 0)) + return_0; + + return 1; } /* Activate LV only if it passes filter */ int lv_activate_with_filter(struct cmd_context *cmd, const char *lvid_s, int exclusive) { - return _lv_activate(cmd, lvid_s, exclusive, 1); + if (!_lv_activate(cmd, lvid_s, exclusive, 1)) + return_0; + + return 1; } int lv_mknodes(struct cmd_context *cmd, const struct logical_volume *lv) -- 2.43.5