diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2018-03-05 12:54:39 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2018-03-06 15:39:27 +0100 |
commit | 23de09aeb87ec10bd1a553ea8868e2f946117232 (patch) | |
tree | 8f8a537b8b1acbd53bde632485b008b7a825644f /tools/lvcreate.c | |
parent | b2f1254c14b7b86789e542be14041252a652eec2 (diff) | |
download | lvm2-23de09aeb87ec10bd1a553ea8868e2f946117232.tar.gz |
lvcreate: fix activation of cached LV
Since LV for caching can be already a stacked LV, proper activation
needs to use lock holding LV.
Diffstat (limited to 'tools/lvcreate.c')
-rw-r--r-- | tools/lvcreate.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/lvcreate.c b/tools/lvcreate.c index 7f86a3731..e901968d7 100644 --- a/tools/lvcreate.c +++ b/tools/lvcreate.c @@ -1222,6 +1222,8 @@ static int _determine_cache_argument(struct volume_group *vg, return_0; /* FIXME */ /* Put origin into resulting activation state first */ + lv = (struct logical_volume *)lv_lock_holder(lv); + if (is_change_activating(lp->activate)) { if ((lp->activate == CHANGE_AAY) && !lv_passes_auto_activation_filter(cmd, lv)) { |