1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

cleanup: simplify initilization

Simplier code and also drop duplicate check for active LV.
This commit is contained in:
Zdenek Kabelac 2021-02-20 22:44:06 +01:00
parent b5f906e984
commit 5237175cb6

View File

@ -6126,7 +6126,7 @@ int lvconvert_writecache_attach_single(struct cmd_context *cmd,
struct volume_group *vg = lv->vg;
struct logical_volume *lv_wcorig;
struct logical_volume *lv_fast;
struct writecache_settings settings;
struct writecache_settings settings = { 0 };
const char *fast_name;
uint32_t block_size_sectors = 0;
char *lockd_fast_args = NULL;
@ -6181,10 +6181,6 @@ int lvconvert_writecache_attach_single(struct cmd_context *cmd,
is_active = lv_is_active(lv);
is_active = lv_is_active(lv);
memset(&settings, 0, sizeof(settings));
if (!get_writecache_settings(cmd, &settings, &block_size_sectors)) {
log_error("Invalid writecache settings.");
goto bad;