]> sourceware.org Git - lvm2.git/commitdiff
Insert some missing stack macros into activation code.
authorAlasdair Kergon <agk@redhat.com>
Fri, 30 Oct 2009 13:07:49 +0000 (13:07 +0000)
committerAlasdair Kergon <agk@redhat.com>
Fri, 30 Oct 2009 13:07:49 +0000 (13:07 +0000)
WHATS_NEW
lib/activate/activate.c

index c18b720fc29ed50e7e0901d7ee197154317d134f..4eecc3ee4a9d1f805dde20cc4d3d9e2298e83ed5 100644 (file)
--- 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
index deccdc40fde89b191030070a000968aa796cb308..b3a70db1d320105c26badaf36cce1507e4d3bf1f 100644 (file)
@@ -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)
This page took 0.04578 seconds and 5 git commands to generate.